Update object.
curl --request POST \
--url https://api.coinfer.ai/api/object/{objid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {
"object_type": "experiment.nsample_stat",
"batch_id": "<string>",
"run_id": "<string>",
"chain_name": "<string>",
"n_sample": 123,
"stat": {}
}
}
'import requests
url = "https://api.coinfer.ai/api/object/{objid}"
payload = { "payload": {
"object_type": "experiment.nsample_stat",
"batch_id": "<string>",
"run_id": "<string>",
"chain_name": "<string>",
"n_sample": 123,
"stat": {}
} }
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({
payload: {
object_type: 'experiment.nsample_stat',
batch_id: '<string>',
run_id: '<string>',
chain_name: '<string>',
n_sample: 123,
stat: {}
}
})
};
fetch('https://api.coinfer.ai/api/object/{objid}', 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://api.coinfer.ai/api/object/{objid}",
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([
'payload' => [
'object_type' => 'experiment.nsample_stat',
'batch_id' => '<string>',
'run_id' => '<string>',
'chain_name' => '<string>',
'n_sample' => 123,
'stat' => [
]
]
]),
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://api.coinfer.ai/api/object/{objid}"
payload := strings.NewReader("{\n \"payload\": {\n \"object_type\": \"experiment.nsample_stat\",\n \"batch_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"chain_name\": \"<string>\",\n \"n_sample\": 123,\n \"stat\": {}\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://api.coinfer.ai/api/object/{objid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {\n \"object_type\": \"experiment.nsample_stat\",\n \"batch_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"chain_name\": \"<string>\",\n \"n_sample\": 123,\n \"stat\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinfer.ai/api/object/{objid}")
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 \"payload\": {\n \"object_type\": \"experiment.nsample_stat\",\n \"batch_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"chain_name\": \"<string>\",\n \"n_sample\": 123,\n \"stat\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"object_type": "experiment",
"model_name": "<string>",
"short_id": "",
"name": "",
"model_id": "",
"status": "",
"meta": "<unknown>",
"n_chains": 0,
"n_variables": 0,
"n_samples": 0,
"sample_update_time": "",
"run_on": "",
"input": "<string>",
"output": "<string>",
"workflow_id": "",
"workflow_name": ""
}
}{
"status": "error",
"code": "<string>",
"message": "<string>"
}Object
Update object.
Update object of certain ID.
Example
Update model:
POST /api/object/M1234567
{
"payload": {
"object_type": "model",
"name": "model name",
"content": {
"meta": {"entrance_file": "main.jl"},
"tree": [],
}
}
}
Update experiment:
POST /api/object/X1234567
{
"payload": {
"object_type": "experiment",
"name": "experiment name",
}
}
POST
/
api
/
object
/
{objid}
Update object.
curl --request POST \
--url https://api.coinfer.ai/api/object/{objid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {
"object_type": "experiment.nsample_stat",
"batch_id": "<string>",
"run_id": "<string>",
"chain_name": "<string>",
"n_sample": 123,
"stat": {}
}
}
'import requests
url = "https://api.coinfer.ai/api/object/{objid}"
payload = { "payload": {
"object_type": "experiment.nsample_stat",
"batch_id": "<string>",
"run_id": "<string>",
"chain_name": "<string>",
"n_sample": 123,
"stat": {}
} }
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({
payload: {
object_type: 'experiment.nsample_stat',
batch_id: '<string>',
run_id: '<string>',
chain_name: '<string>',
n_sample: 123,
stat: {}
}
})
};
fetch('https://api.coinfer.ai/api/object/{objid}', 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://api.coinfer.ai/api/object/{objid}",
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([
'payload' => [
'object_type' => 'experiment.nsample_stat',
'batch_id' => '<string>',
'run_id' => '<string>',
'chain_name' => '<string>',
'n_sample' => 123,
'stat' => [
]
]
]),
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://api.coinfer.ai/api/object/{objid}"
payload := strings.NewReader("{\n \"payload\": {\n \"object_type\": \"experiment.nsample_stat\",\n \"batch_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"chain_name\": \"<string>\",\n \"n_sample\": 123,\n \"stat\": {}\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://api.coinfer.ai/api/object/{objid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {\n \"object_type\": \"experiment.nsample_stat\",\n \"batch_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"chain_name\": \"<string>\",\n \"n_sample\": 123,\n \"stat\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinfer.ai/api/object/{objid}")
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 \"payload\": {\n \"object_type\": \"experiment.nsample_stat\",\n \"batch_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"chain_name\": \"<string>\",\n \"n_sample\": 123,\n \"stat\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"object_type": "experiment",
"model_name": "<string>",
"short_id": "",
"name": "",
"model_id": "",
"status": "",
"meta": "<unknown>",
"n_chains": 0,
"n_variables": 0,
"n_samples": 0,
"sample_update_time": "",
"run_on": "",
"input": "<string>",
"output": "<string>",
"workflow_id": "",
"workflow_name": ""
}
}{
"status": "error",
"code": "<string>",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
- CreateNSampleStatReq
- UpdateModel
- UpdateExperiment
- UpdateEventReq
- CreateTextMessageReq
- CreateProtobufMessageReq
- UpdateWorkflowReq
- UpdateDataReq
- SaveAnalyzerResultReq
Show child attributes
Show child attributes