NAV
Ruby Python Javascript Go Php Java

doprax API v1.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.

Doprax API to be used CI/CD and deploymen of services to doprax cloud.

Base URLs:

Authentication

Default

get_projects

Code samples

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.get 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-KEY': 'API_KEY'
}

r = requests.get('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/',
{
  method: 'GET',

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/");
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());

GET /projects/

get the list of all projects

Example responses

200 Response

[
  {
    "project_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "title": "project one",
    "description": "short paragraph to describe the project"
  }
]

Responses

Status Meaning Description Schema
200 OK successfully returned list of all projects Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [project] false none none
» project_code string(uuid) false none none
» title string false none none
» description string false none none

post_projects

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.post 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/', headers = headers)

print(r.json())

const inputBody = '{
  "title": "project one",
  "description": "short paragraph to describe the project"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/");
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());

POST /projects/

create a new project

Body parameter

{
  "title": "project one",
  "description": "short paragraph to describe the project"
}

Parameters

Name In Type Required Description
body body object true a JSON object containing project information
» title body string false none
» description body string false none

Example responses

201 Response

{
  "project_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "title": "project one",
  "description": "short paragraph to describe the project"
}

Responses

Status Meaning Description Schema
201 Created successfully created a new project. Returned the new project info in JSON format project

get_projects{project_code}_

Code samples

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.get 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-KEY': 'API_KEY'
}

r = requests.get('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/',
{
  method: 'GET',

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/");
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());

GET /projects/{project_code}/

get info of project with specific project_code in JSON format

Parameters

Name In Type Required Description
project_code path string(uuid) true project_code (identifier) of the requsted project

Example responses

200 Response

{
  "project_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "title": "project one",
  "description": "short paragraph to describe the project"
}

Responses

Status Meaning Description Schema
200 OK successfully returned project info project

delete_projects{project_code}_

Code samples

require 'rest-client'
require 'json'

headers = {
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.delete 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'X-API-KEY': 'API_KEY'
}

r = requests.delete('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/', headers = headers)

print(r.json())


const headers = {
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/',
{
  method: 'DELETE',

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/");
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());

DELETE /projects/{project_code}/

delete project with specific project_code

Parameters

Name In Type Required Description
project_code path string(uuid) true project_code (identifier) of the project you want to delete

Responses

Status Meaning Description Schema
200 OK successfully set project for deletion None

get_projects{project_code}used-services

Code samples

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.get 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-KEY': 'API_KEY'
}

r = requests.get('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/',
{
  method: 'GET',

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/");
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());

GET /projects/{project_code}/used-services/

get the list of all used services for a project with specific project_code

Parameters

Name In Type Required Description
project_code path string(uuid) true project_code (identifier) of the requested project

Example responses

200 Response

[
  {
    "us": {
      "id": 134,
      "used_service_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "service": {
        "id": 14,
        "title": "mysql database",
        "slug": "string",
        "description": "mysql is a popular relational database",
        "service_code": "d240f4ee-6c53-4b31-90e6-d203748f0553",
        "created": "2020-07-29T09:12:33.001Z",
        "logo": "mysql.png"
      },
      "created": "2020-07-30T09:10:32.001Z",
      "host_name": "mysql-138cb7b8-f"
    },
    "env_list": [
      {
        "env_key": "MYSQL_DATABASE",
        "env_value": "database01"
      }
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK successfully returned the list of all used services in the project Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [usedService] false none none
» us object false none none
»» id integer(int64) false none none
»» used_service_code string(uuid) false none none
»» service service false none none
»»» id integer(int64) false none none
»»» title string false none none
»»» slug string(alphanumeric) false none uniquely identifies a service
»»» description string false none none
»»» service_code string(uuid) false none none
»»» created string(date-time) false none none
»»» logo string false none none
»» created string(date-time) false none none
»» host_name string(hostname) false none none
» env_list [env] false none none
»» env_key string false none environment variable key
»» env_value string false none environment variable value

post_projects{project_code}used-services

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.post 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': 'API_KEY'
}

r = requests.post('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/', headers = headers)

print(r.json())

const inputBody = '{
  "service_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "env_var_list": [
    {
      "env_key": "MYSQL_DATABASE",
      "env_value": "database01"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/");
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());

POST /projects/{project_code}/used-services/

add a new service to the project i.e. create new used service for the project

Body parameter

{
  "service_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "env_var_list": [
    {
      "env_key": "MYSQL_DATABASE",
      "env_value": "database01"
    }
  ]
}

Parameters

Name In Type Required Description
project_code path string(uuid) true project_code (identifier) of the requested project
body body object true a JSON object containing used service info and environment variables needed for it
» service_code body string(uuid) false none
» env_var_list body [env] false none
»» env_key body string false environment variable key
»» env_value body string false environment variable value

Responses

Status Meaning Description Schema
201 Created successfully added a service to the project i.e. created a new used service in the project None

get_projects{project_code}used-services{used_service_id}_

Code samples

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.get 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-KEY': 'API_KEY'
}

r = requests.get('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/',
{
  method: 'GET',

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/");
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());

GET /projects/{project_code}/used-services/{used_service_id}/

get details of a used service with service_code of service_code

Parameters

Name In Type Required Description
project_code path string(uuid) true project_code (identifier) of the requsted project
used_service_id path integer(int64) true id of the used service

Example responses

200 Response

{
  "us": {
    "id": 134,
    "used_service_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "service": {
      "id": 14,
      "title": "mysql database",
      "slug": "string",
      "description": "mysql is a popular relational database",
      "service_code": "d240f4ee-6c53-4b31-90e6-d203748f0553",
      "created": "2020-07-29T09:12:33.001Z",
      "logo": "mysql.png"
    },
    "created": "2020-07-30T09:10:32.001Z",
    "host_name": "mysql-138cb7b8-f"
  },
  "env_list": [
    {
      "env_key": "MYSQL_DATABASE",
      "env_value": "database01"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK return a JSON with info of the used service usedService

delete_projects{project_code}used-services{used_service_id}_

Code samples

require 'rest-client'
require 'json'

headers = {
  'X-API-KEY' => 'API_KEY'
}

result = RestClient.delete 'https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'X-API-KEY': 'API_KEY'
}

r = requests.delete('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/', headers = headers)

print(r.json())


const headers = {
  'X-API-KEY':'API_KEY'
};

fetch('https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/',
{
  method: 'DELETE',

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "X-API-KEY": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/", data)
    req.Header = headers

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

<?php

require 'vendor/autoload.php';

$headers = array(
    'X-API-KEY' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://virtserver.swaggerhub.com/hemenxyz3/project_api/1.0/projects/{project_code}/used-services/{used_service_id}/");
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());

DELETE /projects/{project_code}/used-services/{used_service_id}/

delete a used service

Parameters

Name In Type Required Description
project_code path string(uuid) true project_code (identifier) of the project
used_service_id path integer(int64) true id of the used service

Responses

Status Meaning Description Schema
204 No Content successfully removed service from the project i.e. deleted the used service None

Schemas

env

{
  "env_key": "MYSQL_DATABASE",
  "env_value": "database01"
}

Properties

Name Type Required Restrictions Description
env_key string false none environment variable key
env_value string false none environment variable value

usedService

{
  "us": {
    "id": 134,
    "used_service_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "service": {
      "id": 14,
      "title": "mysql database",
      "slug": "string",
      "description": "mysql is a popular relational database",
      "service_code": "d240f4ee-6c53-4b31-90e6-d203748f0553",
      "created": "2020-07-29T09:12:33.001Z",
      "logo": "mysql.png"
    },
    "created": "2020-07-30T09:10:32.001Z",
    "host_name": "mysql-138cb7b8-f"
  },
  "env_list": [
    {
      "env_key": "MYSQL_DATABASE",
      "env_value": "database01"
    }
  ]
}

Properties

Name Type Required Restrictions Description
us object false none none
» id integer(int64) false none none
» used_service_code string(uuid) false none none
» service service false none none
» created string(date-time) false none none
» host_name string(hostname) false none none
env_list [env] false none none

service

{
  "id": 14,
  "title": "mysql database",
  "slug": "string",
  "description": "mysql is a popular relational database",
  "service_code": "d240f4ee-6c53-4b31-90e6-d203748f0553",
  "created": "2020-07-29T09:12:33.001Z",
  "logo": "mysql.png"
}

Properties

Name Type Required Restrictions Description
id integer(int64) false none none
title string false none none
slug string(alphanumeric) false none uniquely identifies a service
description string false none none
service_code string(uuid) false none none
created string(date-time) false none none
logo string false none none

project

{
  "project_code": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "title": "project one",
  "description": "short paragraph to describe the project"
}

Properties

Name Type Required Restrictions Description
project_code string(uuid) false none none
title string false none none
description string false none none