NAV Navigation
Shell HTTP JavaScript Node.js Ruby Python Java Go

Seat Service v1.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 Seat Service. Exposes health checks and supports basic CRUD operations

Base URLs:

Terms of service Email: Blue Team Web: Blue Team License: Codacy. All rights reserved

seat

Seat endpoints

listAuthors

Code samples

# You can also use wget
curl -X GET /v1/organization/{organizationId}/authors \
  -H 'Accept: application/json'

GET /v1/organization/{organizationId}/authors HTTP/1.1

Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: '/v1/organization/{organizationId}/authors',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('/v1/organization/{organizationId}/authors',
{
  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'
}

result = RestClient.get '/v1/organization/{organizationId}/authors',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/v1/organization/{organizationId}/authors', params={

}, headers = headers)

print r.json()

URL obj = new URL("/v1/organization/{organizationId}/authors");
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"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/v1/organization/{organizationId}/authors", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /organization/{organizationId}/authors

Get all authors that belong to the organization

Parameters

Name In Type Required Description
organizationId path integer(int64) true organization Id

Example responses

Successful operation

[
  {
    "id": 1,
    "emails": [
      "red@codacy.com",
      "blue@codacy.com"
    ]
  }
]

400 Response

{
  "description": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation Authors
400 Bad Request Bad Request Error
500 Internal Server Error Internal Server Error Error

createAuthors

Code samples

# You can also use wget
curl -X POST /v1/organization/{organizationId}/authors \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v1/organization/{organizationId}/authors HTTP/1.1

Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

$.ajax({
  url: '/v1/organization/{organizationId}/authors',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '[
  {
    "emails": [
      "string"
    ]
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('/v1/organization/{organizationId}/authors',
{
  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 '/v1/organization/{organizationId}/authors',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/v1/organization/{organizationId}/authors', params={

}, headers = headers)

print r.json()

URL obj = new URL("/v1/organization/{organizationId}/authors");
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", "/v1/organization/{organizationId}/authors", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /organization/{organizationId}/authors

Add array of author seats to the organization

Body parameter

[
  {
    "emails": [
      "string"
    ]
  }
]

Parameters

Name In Type Required Description
organizationId path integer(int64) true organization Id
body body array[object] true none

Example responses

200 Response

[
  {
    "id": 0,
    "emails": [
      "string"
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Authors
400 Bad Request Bad Request Error
500 Internal Server Error Internal Server Error Error

createAuthor

Code samples

# You can also use wget
curl -X POST /v1/organization/{organizationId}/author \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v1/organization/{organizationId}/author HTTP/1.1

Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

$.ajax({
  url: '/v1/organization/{organizationId}/author',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "emails": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('/v1/organization/{organizationId}/author',
{
  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 '/v1/organization/{organizationId}/author',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/v1/organization/{organizationId}/author', params={

}, headers = headers)

print r.json()

URL obj = new URL("/v1/organization/{organizationId}/author");
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", "/v1/organization/{organizationId}/author", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /organization/{organizationId}/author

Add an author seat to the organization

Body parameter

{
  "emails": [
    "string"
  ]
}

Parameters

Name In Type Required Description
organizationId path integer(int64) true organization Id
body body AuthorBody true none

Example responses

200 Response

{
  "id": 0,
  "emails": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation Author
400 Bad Request Bad Request Error
500 Internal Server Error Internal Server Error Error

deleteAuthor

Code samples

# You can also use wget
curl -X DELETE /v1/organization/{organizationId}/author/{authorId} \
  -H 'Accept: application/json'

DELETE /v1/organization/{organizationId}/author/{authorId} HTTP/1.1

Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: '/v1/organization/{organizationId}/author/{authorId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('/v1/organization/{organizationId}/author/{authorId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.delete '/v1/organization/{organizationId}/author/{authorId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.delete('/v1/organization/{organizationId}/author/{authorId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/v1/organization/{organizationId}/author/{authorId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/v1/organization/{organizationId}/author/{authorId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /organization/{organizationId}/author/{authorId}

Delete an author from the organization by the id

Parameters

Name In Type Required Description
organizationId path integer(int64) true organization Id
authorId path integer(int64) true author Id

Example responses

400 Response

{
  "description": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation None
400 Bad Request Bad Request Error
500 Internal Server Error Internal Server Error Error

Schemas

Authors

[
  {
    "id": 0,
    "emails": [
      "string"
    ]
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Author] false none none

Author

{
  "id": 0,
  "emails": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
id integer(int64) true none none
emails [string] true none none

AuthorBody

{
  "emails": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
emails [string] true none none

Error

{
  "description": "string"
}

Properties

Name Type Required Restrictions Description
description string true none none