curl --request POST \
--url http://localhost:9371/services/install \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"adapter": "<string>",
"id": "<string>",
"version": "^1.0.0",
"autoUpdate": true
}
'import requests
url = "http://localhost:9371/services/install"
payload = {
"source": "<string>",
"adapter": "<string>",
"id": "<string>",
"version": "^1.0.0",
"autoUpdate": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
source: '<string>',
adapter: '<string>',
id: '<string>',
version: '^1.0.0',
autoUpdate: true
})
};
fetch('http://localhost:9371/services/install', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9371",
CURLOPT_URL => "http://localhost:9371/services/install",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source' => '<string>',
'adapter' => '<string>',
'id' => '<string>',
'version' => '^1.0.0',
'autoUpdate' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:9371/services/install"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"adapter\": \"<string>\",\n \"id\": \"<string>\",\n \"version\": \"^1.0.0\",\n \"autoUpdate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:9371/services/install")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"adapter\": \"<string>\",\n \"id\": \"<string>\",\n \"version\": \"^1.0.0\",\n \"autoUpdate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9371/services/install")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"<string>\",\n \"adapter\": \"<string>\",\n \"id\": \"<string>\",\n \"version\": \"^1.0.0\",\n \"autoUpdate\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "rate_limit_exceeded",
"message": "<string>",
"retryAfter": 1
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Install a service from a registry
Resolves the registry source URL, downloads the definition from the returned downloadUrl, validates the manifest, and stores it. Optional adapter and id override the resolver/registry defaults; when adapter is omitted the best compatible and active adapter for the definition kind is used. The registry source URL is stored for future updates.
curl --request POST \
--url http://localhost:9371/services/install \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"adapter": "<string>",
"id": "<string>",
"version": "^1.0.0",
"autoUpdate": true
}
'import requests
url = "http://localhost:9371/services/install"
payload = {
"source": "<string>",
"adapter": "<string>",
"id": "<string>",
"version": "^1.0.0",
"autoUpdate": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
source: '<string>',
adapter: '<string>',
id: '<string>',
version: '^1.0.0',
autoUpdate: true
})
};
fetch('http://localhost:9371/services/install', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9371",
CURLOPT_URL => "http://localhost:9371/services/install",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source' => '<string>',
'adapter' => '<string>',
'id' => '<string>',
'version' => '^1.0.0',
'autoUpdate' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:9371/services/install"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"adapter\": \"<string>\",\n \"id\": \"<string>\",\n \"version\": \"^1.0.0\",\n \"autoUpdate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:9371/services/install")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"adapter\": \"<string>\",\n \"id\": \"<string>\",\n \"version\": \"^1.0.0\",\n \"autoUpdate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9371/services/install")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"<string>\",\n \"adapter\": \"<string>\",\n \"id\": \"<string>\",\n \"version\": \"^1.0.0\",\n \"autoUpdate\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "rate_limit_exceeded",
"message": "<string>",
"retryAfter": 1
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Body
Request body used to install a service from a registry.
Registry URL to resolve for service metadata, then download the definition.
1Optional adapter module identifier. Overrides the resolver-selected adapter.
1Optional service identifier. Overrides registry default.
1Optional semantic range or exact version. Resolves from registry. Defaults to latest.
1"^1.0.0"
Whether to auto-update this service with the registry source it is installed from. Defaults to true.
Response
The service was installed and stored.
Response returned after a service is installed.
Identifier assigned to the newly installed service.
1Was this page helpful?