Render PPM Installation Snippet
Generate a copyable Rscript command for PPM package installation with automatic biocVersion detection when needed
curl --request POST \
--url https://mycluster.domino.tech/api/v4/ppm/snippet \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"biocVersion": "<string>",
"constraints": "<string>",
"repo": "<string>",
"targetSnapshot": "<string>",
"workspaceRepos": [
{
"baseUrl": "<string>",
"currentSnapshot": "<string>",
"fullUrl": "<string>",
"repoName": "<string>"
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/v4/ppm/snippet"
payload = {
"biocVersion": "<string>",
"constraints": "<string>",
"repo": "<string>",
"targetSnapshot": "<string>",
"workspaceRepos": [
{
"baseUrl": "<string>",
"currentSnapshot": "<string>",
"fullUrl": "<string>",
"repoName": "<string>"
}
]
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
biocVersion: '<string>',
constraints: '<string>',
repo: '<string>',
targetSnapshot: '<string>',
workspaceRepos: [
{
baseUrl: '<string>',
currentSnapshot: '<string>',
fullUrl: '<string>',
repoName: '<string>'
}
]
})
};
fetch('https://mycluster.domino.tech/api/v4/ppm/snippet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/v4/ppm/snippet",
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([
'biocVersion' => '<string>',
'constraints' => '<string>',
'repo' => '<string>',
'targetSnapshot' => '<string>',
'workspaceRepos' => [
[
'baseUrl' => '<string>',
'currentSnapshot' => '<string>',
'fullUrl' => '<string>',
'repoName' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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 := "https://mycluster.domino.tech/api/v4/ppm/snippet"
payload := strings.NewReader("{\n \"biocVersion\": \"<string>\",\n \"constraints\": \"<string>\",\n \"repo\": \"<string>\",\n \"targetSnapshot\": \"<string>\",\n \"workspaceRepos\": [\n {\n \"baseUrl\": \"<string>\",\n \"currentSnapshot\": \"<string>\",\n \"fullUrl\": \"<string>\",\n \"repoName\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
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("https://mycluster.domino.tech/api/v4/ppm/snippet")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"biocVersion\": \"<string>\",\n \"constraints\": \"<string>\",\n \"repo\": \"<string>\",\n \"targetSnapshot\": \"<string>\",\n \"workspaceRepos\": [\n {\n \"baseUrl\": \"<string>\",\n \"currentSnapshot\": \"<string>\",\n \"fullUrl\": \"<string>\",\n \"repoName\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/v4/ppm/snippet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"biocVersion\": \"<string>\",\n \"constraints\": \"<string>\",\n \"repo\": \"<string>\",\n \"targetSnapshot\": \"<string>\",\n \"workspaceRepos\": [\n {\n \"baseUrl\": \"<string>\",\n \"currentSnapshot\": \"<string>\",\n \"fullUrl\": \"<string>\",\n \"repoName\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"text": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
Request to render a snippet
Bioconductor version for Bioconductor repositories (e.g., "3.19", "3.20"). If omitted, auto-discovers latest version
Comma-separated package constraints (e.g., "ggplot2==3.5.0,dplyr>=1.0.0,sf"). If omitted, generates snippet without specific packages
Output mode for the snippet. "r" generates pure R code for direct execution in R console. "bash" wraps the R code in a Rscript command for bash execution. Defaults to "r" if omitted
r, bash Specific repository name filter (e.g., "cran", "bioconductor", "pypi"). If omitted, uses all enabled repos
Repository type filter. If omitted, uses all repository types
R, Bioconductor, Python Target snapshot date for the snippet generation. If omitted, uses latest
Array of workspace repositories from renv.lock. If provided, snippet generation is based on matching server repositories
Show child attributes
Show child attributes
Response
Success
The rendered Rscript command
Related topics
Use Posit Package Manager in a workspaceSet up Posit Package Manager integrationGet Workspace PPM Config with Repository DetectionSearch PPM Snapshots with Workspace Repository TargetingWas this page helpful?
curl --request POST \
--url https://mycluster.domino.tech/api/v4/ppm/snippet \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"biocVersion": "<string>",
"constraints": "<string>",
"repo": "<string>",
"targetSnapshot": "<string>",
"workspaceRepos": [
{
"baseUrl": "<string>",
"currentSnapshot": "<string>",
"fullUrl": "<string>",
"repoName": "<string>"
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/v4/ppm/snippet"
payload = {
"biocVersion": "<string>",
"constraints": "<string>",
"repo": "<string>",
"targetSnapshot": "<string>",
"workspaceRepos": [
{
"baseUrl": "<string>",
"currentSnapshot": "<string>",
"fullUrl": "<string>",
"repoName": "<string>"
}
]
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
biocVersion: '<string>',
constraints: '<string>',
repo: '<string>',
targetSnapshot: '<string>',
workspaceRepos: [
{
baseUrl: '<string>',
currentSnapshot: '<string>',
fullUrl: '<string>',
repoName: '<string>'
}
]
})
};
fetch('https://mycluster.domino.tech/api/v4/ppm/snippet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/v4/ppm/snippet",
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([
'biocVersion' => '<string>',
'constraints' => '<string>',
'repo' => '<string>',
'targetSnapshot' => '<string>',
'workspaceRepos' => [
[
'baseUrl' => '<string>',
'currentSnapshot' => '<string>',
'fullUrl' => '<string>',
'repoName' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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 := "https://mycluster.domino.tech/api/v4/ppm/snippet"
payload := strings.NewReader("{\n \"biocVersion\": \"<string>\",\n \"constraints\": \"<string>\",\n \"repo\": \"<string>\",\n \"targetSnapshot\": \"<string>\",\n \"workspaceRepos\": [\n {\n \"baseUrl\": \"<string>\",\n \"currentSnapshot\": \"<string>\",\n \"fullUrl\": \"<string>\",\n \"repoName\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
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("https://mycluster.domino.tech/api/v4/ppm/snippet")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"biocVersion\": \"<string>\",\n \"constraints\": \"<string>\",\n \"repo\": \"<string>\",\n \"targetSnapshot\": \"<string>\",\n \"workspaceRepos\": [\n {\n \"baseUrl\": \"<string>\",\n \"currentSnapshot\": \"<string>\",\n \"fullUrl\": \"<string>\",\n \"repoName\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/v4/ppm/snippet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"biocVersion\": \"<string>\",\n \"constraints\": \"<string>\",\n \"repo\": \"<string>\",\n \"targetSnapshot\": \"<string>\",\n \"workspaceRepos\": [\n {\n \"baseUrl\": \"<string>\",\n \"currentSnapshot\": \"<string>\",\n \"fullUrl\": \"<string>\",\n \"repoName\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"text": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}