Share a run
curl --request POST \
--url https://public-api.revilico.bio/v1/runs/{runId}/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
"<string>"
]
}
'import requests
url = "https://public-api.revilico.bio/v1/runs/{runId}/shares"
payload = { "users": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({users: ['<string>']})
};
fetch('https://public-api.revilico.bio/v1/runs/{runId}/shares', 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://public-api.revilico.bio/v1/runs/{runId}/shares",
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([
'users' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://public-api.revilico.bio/v1/runs/{runId}/shares"
payload := strings.NewReader("{\n \"users\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://public-api.revilico.bio/v1/runs/{runId}/shares")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"users\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.revilico.bio/v1/runs/{runId}/shares")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"users\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"shared": [
{
"id": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"sharedBy": {
"name": "<string>",
"email": "<string>"
},
"via": "share",
"sharedAt": "2023-11-07T05:31:56Z"
}
],
"created": 123,
"alreadyShared": 123,
"notice": "<string>"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is malformed."
}
}{
"error": {
"code": "MISSING_CREDENTIALS",
"message": "The API key is missing or not valid."
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "The key may not do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found, or not visible to you."
}
}{
"error": {
"code": "INVALID_PARAMETERS",
"message": "The parameters or input files don't fit the engine."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Something went wrong on our side."
}
}Sharing
Share a run
Gives people read access to a run: its status, results, outputs and files (not its inputs, which stay with the owner). They can share it on. They must be active members of the run’s owner’s organization; give each as an email or a user_… id from GET /v1/org/members. The owner, or anyone the run is shared with, can share it. Nobody is notified, except that the owner gets an email when someone else shares their run. Sharing with someone who already has it is not an error.
Scope: runs:write.
POST
/
v1
/
runs
/
{runId}
/
shares
Share a run
curl --request POST \
--url https://public-api.revilico.bio/v1/runs/{runId}/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
"<string>"
]
}
'import requests
url = "https://public-api.revilico.bio/v1/runs/{runId}/shares"
payload = { "users": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({users: ['<string>']})
};
fetch('https://public-api.revilico.bio/v1/runs/{runId}/shares', 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://public-api.revilico.bio/v1/runs/{runId}/shares",
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([
'users' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://public-api.revilico.bio/v1/runs/{runId}/shares"
payload := strings.NewReader("{\n \"users\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://public-api.revilico.bio/v1/runs/{runId}/shares")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"users\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.revilico.bio/v1/runs/{runId}/shares")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"users\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"shared": [
{
"id": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"sharedBy": {
"name": "<string>",
"email": "<string>"
},
"via": "share",
"sharedAt": "2023-11-07T05:31:56Z"
}
],
"created": 123,
"alreadyShared": 123,
"notice": "<string>"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is malformed."
}
}{
"error": {
"code": "MISSING_CREDENTIALS",
"message": "The API key is missing or not valid."
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "The key may not do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found, or not visible to you."
}
}{
"error": {
"code": "INVALID_PARAMETERS",
"message": "The parameters or input files don't fit the engine."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Something went wrong on our side."
}
}Authorizations
An API key from the web app (Settings → Developer), sent as Authorization: Bearer rvl_live_….
Path Parameters
Run id, run_….
Body
application/json
Who to share with: each an email address or a user id (user_…) from GET /v1/org/members. They must be active members of the run owner's organization.
Required array length:
1 - 20 elementsMinimum string length:
1
