Remote Provider Service v2.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
API for the Remote Provider Service. Exposes health checks and supports communication with Git Providers.
Base URLs:
Terms of service Email: Blue Team Web: Blue Team License: Codacy. All rights reserved
restricted
Endpoints that should only be used in special cases
getRepositoryByName
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName} \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName} HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationPath}/repositories/{remoteRepositoryName}
Finds a specific repo for remote organization path, and repository name of a specific provider
This endpoint should only be used when the caller does not have access to organization or repository ids. It introduces the concept of path which has a very restricted usage in the Codacy platform. Prefer to use the endpoint with organization and repository ids and names.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationPath | path | string | true | Remote organization full path |
| remoteRepositoryName | path | string | true | Remote repository name |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
Successful operation
{
"data": {
"id": 1,
"name": "Website",
"owner": "Codacy",
"permissions": {
"admin": true,
"push": true,
"pull": true
}
}
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteRepositoryResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 403 | Forbidden | Forbidden | Forbidden |
| 404 | Not Found | Not Found | NotFound |
| 500 | Internal Server Error | Unexpected error happened | Error |
organization
listOrganizationRepositories
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories
Finds all repos for remote organization name of a specific provider
Finds all repos for remote organization name of a specific provider.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| organizationType | query | string | false | The organization type to search. |
| search | query | string | false | Filter the results searching by this string. |
| cursor | query | string | false | Cursor to list elements after. |
| limit | query | string(int32) | false | Number of items to return. |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
| organizationType | Organization |
| organizationType | Account |
Example responses
Successful operation
{
"pagination": {
"cursor": "YugfO05==",
"limit": 20,
"total": 73
},
"data": [
{
"id": 1,
"name": "Website",
"owner": "Codacy",
"permissions": {
"admin": true,
"push": true,
"pull": true
}
}
]
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteRepositoryListResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
| 502 | Bad Gateway | Bad gateway error | BadGateway |
listRepositoryMembers
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/memberships
List people that have access to a repository
List people that have access to a repository.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| remoteRepositoryIdentifier | path | string | true | Remote repository identifier |
| remoteRepositoryName | path | string | true | Remote repository name |
| cursor | query | string | false | Cursor to list elements after. |
| limit | query | string(int32) | false | Number of items to return. |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
Successful operation
{
"pagination": {
"cursor": "YugfO05==",
"limit": 20,
"total": 73
},
"data": [
{
"id": 1
},
{
"id": 2
}
]
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteRepositoryMembershipListResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
listOrganizations
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations
Finds all organizations for a remote user of a specific provider.
Finds all organizations for a remote user of a specific provider.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| cursor | query | string | false | Cursor to list elements after. |
| limit | query | string(int32) | false | Number of items to return. |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
Successful operation
{
"pagination": {
"cursor": "YugfO05==",
"limit": 20,
"total": 73
},
"data": [
{
"userId": 1,
"organizationId": 1,
"status": "active",
"role": "admin"
}
]
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteOrganizationsListResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
getRepository
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName} \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName} HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}
Finds a specific repo for remote organization name and id and repository name and id of a specific provider
Finds a specific repo for remote organization name and id and repository name and id of a specific provider.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| remoteRepositoryIdentifier | path | string | true | Remote repository identifier |
| remoteRepositoryName | path | string | true | Remote repository name |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
Successful operation
{
"data": {
"id": 1,
"name": "Website",
"owner": "Codacy",
"permissions": {
"admin": true,
"push": true,
"pull": true
}
}
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteRepositoryResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 403 | Forbidden | Forbidden | Forbidden |
| 404 | Not Found | Not Found | NotFound |
| 500 | Internal Server Error | Unexpected error happened | Error |
createNotifications
Code samples
# You can also use wget
curl -X POST http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications HTTP/1.1
Host: rps.dev.codacy.org
Content-Type: application/json
Accept: application/json
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"identifier": "string",
"name": "string",
"detailsUrl": "string",
"status": {
"state": "in_progress",
"outcome": "success"
},
"comments": [
{
"path": "string",
"severity": "info",
"message": "string",
"startLine": 0,
"endLine": 0
}
],
"summary": {
"message": "string"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories/{remoteRepositoryIdentifier}/{remoteRepositoryName}/pullRequest/{pullRequestNumber}/commit/{headSha}/notifications
Creates notifications on a specific commit
Body parameter
{
"identifier": "string",
"name": "string",
"detailsUrl": "string",
"status": {
"state": "in_progress",
"outcome": "success"
},
"comments": [
{
"path": "string",
"severity": "info",
"message": "string",
"startLine": 0,
"endLine": 0
}
],
"summary": {
"message": "string"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| remoteRepositoryIdentifier | path | string | true | Remote repository identifier |
| remoteRepositoryName | path | string | true | Remote repository name |
| pullRequestNumber | path | integer(int64) | true | Number of the pull request analysed |
| headSha | path | string | true | Commit SHA analysed |
| body | body | Notifications | true | none |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Successful operation | None |
| 400 | Bad Request | Problem encountered in the request | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
getOrganization
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName} \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName} HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}
Finds information for a specific organization and membership for the user
Finds membership status for the user in a specific organization.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| token | header | string | false | Provider Token |
| organizationType | query | string | false | The organization type to search. |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
| organizationType | Organization |
| organizationType | Account |
Example responses
Successful operation
{
"data": {
"id": 1,
"name": "Codacy",
"avatar": "https://www.gravatar.com/avatar/some-random-avatar",
"userId": "1",
"userRole": "Admin"
}
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteOrganizationResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
getUserPermissionOnOrganization
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/permission
Finds permission for the user for a specific organization
Finds membership status for the user in a specific organization.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| token | header | string | false | Provider Token |
| organizationType | query | string | false | The organization type to search. |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
| organizationType | Organization |
| organizationType | Account |
Example responses
Successful operation
{
"data": {
"id": 1,
"name": "Codacy",
"avatar": "https://www.gravatar.com/avatar/some-random-avatar",
"userId": "1",
"userRole": "Admin"
}
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteOrganizationResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
cleanCache
Code samples
# You can also use wget
curl -X POST http://rps.dev.codacy.org/v2/cleanCache \
-H 'Accept: application/json' \
-H 'token: string'
POST http://rps.dev.codacy.org/v2/cleanCache HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/cleanCache',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/cleanCache',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.post 'http://rps.dev.codacy.org/v2/cleanCache',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.post('http://rps.dev.codacy.org/v2/cleanCache', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/cleanCache");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://rps.dev.codacy.org/v2/cleanCache", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /cleanCache
Cleans all cache entries for a user token
Cleans all cache entries for a user token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| token | header | string | true | Provider Token |
Example responses
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | None |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
createOrganizationHook
Code samples
# You can also use wget
curl -X POST http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'token: string'
POST http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks HTTP/1.1
Host: rps.dev.codacy.org
Content-Type: application/json
Accept: application/json
token: string
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"callback": "string",
"secret": "string",
"events": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.post 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': 'string'
}
r = requests.post('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /{provider}/users/{remoteUserIdentifier}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/hooks
Creates a hook against the given organization
Body parameter
{
"callback": "string",
"secret": "string",
"events": [
"string"
]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| token | header | string | false | Provider Token |
| body | body | OrganizationHook | true | none |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | None |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
createSystemHook
Code samples
# You can also use wget
curl -X POST http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'token: string'
POST http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system HTTP/1.1
Host: rps.dev.codacy.org
Content-Type: application/json
Accept: application/json
token: string
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"callback": "string",
"secret": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.post 'http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': 'string'
}
r = requests.post('http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://rps.dev.codacy.org/v2/{provider}/users/{remoteUserIdentifier}/hooks/system", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /{provider}/users/{remoteUserIdentifier}/hooks/system
Creates a hook in the platform
Body parameter
{
"callback": "string",
"secret": "string"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteUserIdentifier | path | string | true | Remote user identifier |
| token | header | string | false | Provider Token |
| body | body | SystemHook | true | none |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
Example responses
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | None |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
listOrganizationAdmins
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/admins
List admins from an organization
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| organizationType | query | string | false | The organization type to search. |
| cursor | query | string | false | Cursor to list elements after. |
| limit | query | string(int32) | false | Number of items to return. |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
| organizationType | Organization |
| organizationType | Account |
Example responses
Successful operation
{
"pagination": {
"cursor": "YugfO05==",
"limit": 20,
"total": 73
},
"data": [
{
"userId": 1
}
]
}
400 Response
{
"description": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | RemoteOrganizationMembershipListResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
troubleshoot
listOrganizationRepositoriesTroubleshoot
Code samples
# You can also use wget
curl -X GET http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories \
-H 'Accept: application/json' \
-H 'token: string'
GET http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories HTTP/1.1
Host: rps.dev.codacy.org
Accept: application/json
token: string
var headers = {
'Accept':'application/json',
'token':'string'
};
$.ajax({
url: 'http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'token':'string'
};
fetch('http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'token' => 'string'
}
result = RestClient.get 'http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'token': 'string'
}
r = requests.get('http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"token": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://rps.dev.codacy.org/v2/troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /troubleshoot/{provider}/organizations/{remoteOrganizationIdentifier}/{remoteOrganizationName}/repositories
List repositories for a given organization for troubleshooting purposes
List repositories for a given organization for troubleshooting purposes. Direct result from calling provider without changes from this service.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| provider | path | string | true | Git Provider |
| remoteOrganizationIdentifier | path | string | true | Remote organization identifier |
| remoteOrganizationName | path | string | true | Remote organization name |
| organizationType | query | string | false | The organization type to search. |
| search | query | string | false | Filter the results searching by this string. |
| cursor | query | string | false | Cursor to list elements after. |
| limit | query | string(int32) | false | Number of items to return. |
| token | header | string | false | Provider Token |
Enumerated Values
| Parameter | Value |
|---|---|
| provider | gh |
| provider | ghe |
| provider | gl |
| provider | gle |
| provider | bb |
| provider | bbe |
| organizationType | Organization |
| organizationType | Account |
Example responses
200 Response
{
"requestMethod": "GET",
"requestBody": "string",
"requestUrl": "string",
"response": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | TroubleshootProviderResponse |
| 400 | Bad Request | Missing authentication token or unknown provider | Error |
| 500 | Internal Server Error | Unexpected error happened | Error |
Schemas
RemoteOrganizationIdentifier
"string"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
RemoteUserIdentifier
"string"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
RemoteRepositoryIdentifier
"string"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
RemoteOrganizationType
"Organization"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | Organization |
| anonymous | Account |
PaginationInfo
{
"cursor": "string",
"limit": 0,
"total": 0
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| cursor | string | false | none | none |
| limit | integer(int32) | false | none | none |
| total | integer(int32) | false | none | none |
RemoteOrganization
{
"id": "string",
"name": "string",
"avatar": "string",
"userId": "string",
"userRole": "Admin"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | RemoteOrganizationIdentifier | true | none | none |
| name | string | true | none | none |
| avatar | string | true | none | none |
| userId | string | true | none | none |
| userRole | string | true | none | none |
Enumerated Values
| Property | Value |
|---|---|
| userRole | Admin |
| userRole | Member |
RemoteOrganizationResponse
{
"data": {
"id": "string",
"name": "string",
"avatar": "string",
"userId": "string",
"userRole": "Admin"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | RemoteOrganization | true | none | none |
RemoteUser
{
"id": "string",
"name": "string",
"avatar": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | RemoteUserIdentifier | true | none | none |
| name | string | true | none | none |
| avatar | string | true | none | none |
RemoteUserListResponse
{
"pagination": {
"cursor": "string",
"limit": 0,
"total": 0
},
"data": [
{
"id": "string",
"name": "string",
"avatar": "string"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| pagination | PaginationInfo | false | none | none |
| data | [RemoteUser] | true | none | none |
RepositoryPermission
{
"admin": true,
"push": true,
"pull": true
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| admin | boolean | true | none | none |
| push | boolean | true | none | none |
| pull | boolean | true | none | none |
RepositoryAccess
"Public"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | Public |
| anonymous | LoginPublic |
| anonymous | Private |
RemoteRepository
{
"id": "string",
"name": "string",
"owner": "string",
"fullPath": "string",
"access": "Public",
"url": "string",
"permission": {
"admin": true,
"push": true,
"pull": true
},
"updatedAt": "2019-08-24T14:15:22Z"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | RemoteRepositoryIdentifier | true | none | none |
| name | string | true | none | none |
| owner | string | true | none | none |
| fullPath | string | true | none | none |
| access | RepositoryAccess | true | none | none |
| url | string | true | none | none |
| permission | RepositoryPermission | true | none | none |
| updatedAt | string(date-time) | false | none | none |
RemoteRepositoryListItem
{
"id": "string",
"name": "string",
"owner": "string",
"fullPath": "string",
"access": "Public",
"url": "string",
"permission": {
"admin": true,
"push": true,
"pull": true
},
"updatedAt": "2019-08-24T14:15:22Z"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | RemoteRepositoryIdentifier | true | none | none |
| name | string | true | none | none |
| owner | string | true | none | none |
| fullPath | string | true | none | none |
| access | RepositoryAccess | true | none | none |
| url | string | true | none | none |
| permission | RepositoryPermission | false | none | none |
| updatedAt | string(date-time) | false | none | none |
RemoteRepositoryResponse
{
"data": {
"id": "string",
"name": "string",
"owner": "string",
"fullPath": "string",
"access": "Public",
"url": "string",
"permission": {
"admin": true,
"push": true,
"pull": true
},
"updatedAt": "2019-08-24T14:15:22Z"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | RemoteRepository | true | none | none |
RemoteRepositoryListResponse
{
"pagination": {
"cursor": "string",
"limit": 0,
"total": 0
},
"data": [
{
"id": "string",
"name": "string",
"owner": "string",
"fullPath": "string",
"access": "Public",
"url": "string",
"permission": {
"admin": true,
"push": true,
"pull": true
},
"updatedAt": "2019-08-24T14:15:22Z"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| pagination | PaginationInfo | false | none | none |
| data | [RemoteRepositoryListItem] | true | none | none |
TroubleshootProviderResponse
{
"requestMethod": "GET",
"requestBody": "string",
"requestUrl": "string",
"response": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| requestMethod | string | true | none | none |
| requestBody | string | false | none | none |
| requestUrl | string | true | none | none |
| response | string | true | none | none |
Enumerated Values
| Property | Value |
|---|---|
| requestMethod | GET |
| requestMethod | POST |
| requestMethod | PATCH |
| requestMethod | PUT |
| requestMethod | DELETE |
RemoteOrganizationListItem
{
"id": "string",
"name": "string",
"avatar": "string",
"userId": "string",
"userRole": "Admin",
"organizationType": "Organization"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | RemoteOrganizationIdentifier | true | none | none |
| name | string | true | none | none |
| avatar | string | true | none | none |
| userId | string | true | none | none |
| userRole | string | false | none | none |
| organizationType | string | true | none | none |
Enumerated Values
| Property | Value |
|---|---|
| userRole | Admin |
| userRole | Member |
| organizationType | Organization |
| organizationType | Account |
RemoteOrganizationsListResponse
{
"pagination": {
"cursor": "string",
"limit": 0,
"total": 0
},
"data": [
{
"id": "string",
"name": "string",
"avatar": "string",
"userId": "string",
"userRole": "Admin",
"organizationType": "Organization"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| pagination | PaginationInfo | false | none | none |
| data | [RemoteOrganizationListItem] | true | none | none |
RemoteRepositoryMembership
{
"userId": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| userId | RemoteUserIdentifier | true | none | none |
RemoteRepositoryMembershipListResponse
{
"pagination": {
"cursor": "string",
"limit": 0,
"total": 0
},
"data": [
{
"userId": "string"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| pagination | PaginationInfo | false | none | none |
| data | [RemoteRepositoryMembership] | true | none | none |
RemoteOrganizationMembership
{
"userId": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| userId | RemoteUserIdentifier | true | none | none |
RemoteOrganizationMembershipListResponse
{
"pagination": {
"cursor": "string",
"limit": 0,
"total": 0
},
"data": [
{
"userId": "string"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| pagination | PaginationInfo | false | none | none |
| data | [RemoteOrganizationMembership] | true | none | none |
OrganizationHook
{
"callback": "string",
"secret": "string",
"events": [
"string"
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| callback | string | true | none | The url that GitHub will call when an event is fired |
| secret | string | true | none | Setting a webhook secret allows you to ensure that POST requests sent to the payload URL are from GitHub. |
| events | [string] | false | none | An array of GitHub events which will trigger when changes happen. Will default to 'organization', 'meta', 'repository' if empty |
SystemHook
{
"callback": "string",
"secret": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| callback | string | true | none | The url that the provider will call when an event is fired |
| secret | string | true | none | Setting a webhook secret allows you to ensure that POST requests sent to the payload URL are from the provider. |
NotificationsComment
{
"path": "string",
"severity": "info",
"message": "string",
"startLine": 0,
"endLine": 0
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| path | string | true | none | The relative path of the file to comment |
| severity | string | true | none | The severity of the comment |
| message | string | true | none | Message of the comment |
| startLine | integer(int64) | true | none | Line where the comment starts |
| endLine | integer(int64) | true | none | Line where the comment ends |
Enumerated Values
| Property | Value |
|---|---|
| severity | info |
| severity | warning |
| severity | error |
NotificationsStatus
{
"state": "in_progress",
"outcome": "success"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| state | string | true | none | Current state of the analysis |
| outcome | string | false | none | Outcome of the analysis |
Enumerated Values
| Property | Value |
|---|---|
| state | in_progress |
| state | completed |
| outcome | success |
| outcome | failure |
| outcome | action_required |
NotificationsSummary
{
"message": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| message | string | true | none | Summary of the analysis results |
Notifications
{
"identifier": "string",
"name": "string",
"detailsUrl": "string",
"status": {
"state": "in_progress",
"outcome": "success"
},
"comments": [
{
"path": "string",
"severity": "info",
"message": "string",
"startLine": 0,
"endLine": 0
}
],
"summary": {
"message": "string"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| identifier | string | true | none | Short identifier of the analysis executed |
| name | string | true | none | Name of the analysis executed |
| detailsUrl | string | true | none | URL with more details about the analysis |
| status | NotificationsStatus | false | none | none |
| comments | [NotificationsComment] | true | none | Comments after 50 will be discarded |
| summary | NotificationsSummary | false | none | none |
Error
{
"description": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| description | string | true | none | none |
NotFound
{
"description": "string",
"error": "NotFound"
}
Properties
allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | Error | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » error | string | true | none | none |
Forbidden
{
"description": "string",
"error": "Forbidden"
}
Properties
allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | Error | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » error | string | true | none | none |
BadGateway
{
"description": "string",
"error": "BadGateway",
"innerMessage": "string"
}
Properties
allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | Error | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » error | string | true | none | none |
| » innerMessage | string | false | none | none |