curl --request POST \
--url http://localhost:3000/api/v1/artifacts/publish \
--header 'Content-Type: application/json' \
--data '
{
"target": "<string>",
"artifactVersion": "<string>",
"assetBase": "<string>",
"basePath": "<string>",
"console": "<string>",
"description": "<string>",
"entrypoint": "<string>",
"execute": true,
"idempotencyKey": "<string>",
"name": "<string>",
"noActivate": false,
"project": "<string>",
"reason": "<string>",
"replaceRelease": true,
"route": "<string>",
"site": "<string>",
"slug": "<string>",
"uploadSession": "<string>",
"visibility": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/artifacts/publish"
payload = {
"target": "<string>",
"artifactVersion": "<string>",
"assetBase": "<string>",
"basePath": "<string>",
"console": "<string>",
"description": "<string>",
"entrypoint": "<string>",
"execute": True,
"idempotencyKey": "<string>",
"name": "<string>",
"noActivate": False,
"project": "<string>",
"reason": "<string>",
"replaceRelease": True,
"route": "<string>",
"site": "<string>",
"slug": "<string>",
"uploadSession": "<string>",
"visibility": "<string>"
}
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({
target: '<string>',
artifactVersion: '<string>',
assetBase: '<string>',
basePath: '<string>',
console: '<string>',
description: '<string>',
entrypoint: '<string>',
execute: true,
idempotencyKey: '<string>',
name: '<string>',
noActivate: false,
project: '<string>',
reason: '<string>',
replaceRelease: true,
route: '<string>',
site: '<string>',
slug: '<string>',
uploadSession: '<string>',
visibility: '<string>'
})
};
fetch('http://localhost:3000/api/v1/artifacts/publish', 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 => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/artifacts/publish",
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([
'target' => '<string>',
'artifactVersion' => '<string>',
'assetBase' => '<string>',
'basePath' => '<string>',
'console' => '<string>',
'description' => '<string>',
'entrypoint' => '<string>',
'execute' => true,
'idempotencyKey' => '<string>',
'name' => '<string>',
'noActivate' => false,
'project' => '<string>',
'reason' => '<string>',
'replaceRelease' => true,
'route' => '<string>',
'site' => '<string>',
'slug' => '<string>',
'uploadSession' => '<string>',
'visibility' => '<string>'
]),
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:3000/api/v1/artifacts/publish"
payload := strings.NewReader("{\n \"target\": \"<string>\",\n \"artifactVersion\": \"<string>\",\n \"assetBase\": \"<string>\",\n \"basePath\": \"<string>\",\n \"console\": \"<string>\",\n \"description\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"execute\": true,\n \"idempotencyKey\": \"<string>\",\n \"name\": \"<string>\",\n \"noActivate\": false,\n \"project\": \"<string>\",\n \"reason\": \"<string>\",\n \"replaceRelease\": true,\n \"route\": \"<string>\",\n \"site\": \"<string>\",\n \"slug\": \"<string>\",\n \"uploadSession\": \"<string>\",\n \"visibility\": \"<string>\"\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:3000/api/v1/artifacts/publish")
.header("Content-Type", "application/json")
.body("{\n \"target\": \"<string>\",\n \"artifactVersion\": \"<string>\",\n \"assetBase\": \"<string>\",\n \"basePath\": \"<string>\",\n \"console\": \"<string>\",\n \"description\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"execute\": true,\n \"idempotencyKey\": \"<string>\",\n \"name\": \"<string>\",\n \"noActivate\": false,\n \"project\": \"<string>\",\n \"reason\": \"<string>\",\n \"replaceRelease\": true,\n \"route\": \"<string>\",\n \"site\": \"<string>\",\n \"slug\": \"<string>\",\n \"uploadSession\": \"<string>\",\n \"visibility\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/artifacts/publish")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"target\": \"<string>\",\n \"artifactVersion\": \"<string>\",\n \"assetBase\": \"<string>\",\n \"basePath\": \"<string>\",\n \"console\": \"<string>\",\n \"description\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"execute\": true,\n \"idempotencyKey\": \"<string>\",\n \"name\": \"<string>\",\n \"noActivate\": false,\n \"project\": \"<string>\",\n \"reason\": \"<string>\",\n \"replaceRelease\": true,\n \"route\": \"<string>\",\n \"site\": \"<string>\",\n \"slug\": \"<string>\",\n \"uploadSession\": \"<string>\",\n \"visibility\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"artifact": "<string>",
"artifactVersion": "<string>",
"authenticated": true,
"consoleUrl": "<string>",
"localSync": {
"reason": "package_source",
"status": "skipped"
},
"publish": "<string>",
"release": "<string>",
"routes": [
{}
],
"site": "<string>",
"success": true,
"upload": {
"attempted": 123,
"skipped": 123
},
"uploadSession": {},
"url": "<string>"
}Upload a local artifact/file/directory to Console and optionally release it to Ravi Pages
curl --request POST \
--url http://localhost:3000/api/v1/artifacts/publish \
--header 'Content-Type: application/json' \
--data '
{
"target": "<string>",
"artifactVersion": "<string>",
"assetBase": "<string>",
"basePath": "<string>",
"console": "<string>",
"description": "<string>",
"entrypoint": "<string>",
"execute": true,
"idempotencyKey": "<string>",
"name": "<string>",
"noActivate": false,
"project": "<string>",
"reason": "<string>",
"replaceRelease": true,
"route": "<string>",
"site": "<string>",
"slug": "<string>",
"uploadSession": "<string>",
"visibility": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/artifacts/publish"
payload = {
"target": "<string>",
"artifactVersion": "<string>",
"assetBase": "<string>",
"basePath": "<string>",
"console": "<string>",
"description": "<string>",
"entrypoint": "<string>",
"execute": True,
"idempotencyKey": "<string>",
"name": "<string>",
"noActivate": False,
"project": "<string>",
"reason": "<string>",
"replaceRelease": True,
"route": "<string>",
"site": "<string>",
"slug": "<string>",
"uploadSession": "<string>",
"visibility": "<string>"
}
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({
target: '<string>',
artifactVersion: '<string>',
assetBase: '<string>',
basePath: '<string>',
console: '<string>',
description: '<string>',
entrypoint: '<string>',
execute: true,
idempotencyKey: '<string>',
name: '<string>',
noActivate: false,
project: '<string>',
reason: '<string>',
replaceRelease: true,
route: '<string>',
site: '<string>',
slug: '<string>',
uploadSession: '<string>',
visibility: '<string>'
})
};
fetch('http://localhost:3000/api/v1/artifacts/publish', 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 => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/artifacts/publish",
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([
'target' => '<string>',
'artifactVersion' => '<string>',
'assetBase' => '<string>',
'basePath' => '<string>',
'console' => '<string>',
'description' => '<string>',
'entrypoint' => '<string>',
'execute' => true,
'idempotencyKey' => '<string>',
'name' => '<string>',
'noActivate' => false,
'project' => '<string>',
'reason' => '<string>',
'replaceRelease' => true,
'route' => '<string>',
'site' => '<string>',
'slug' => '<string>',
'uploadSession' => '<string>',
'visibility' => '<string>'
]),
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:3000/api/v1/artifacts/publish"
payload := strings.NewReader("{\n \"target\": \"<string>\",\n \"artifactVersion\": \"<string>\",\n \"assetBase\": \"<string>\",\n \"basePath\": \"<string>\",\n \"console\": \"<string>\",\n \"description\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"execute\": true,\n \"idempotencyKey\": \"<string>\",\n \"name\": \"<string>\",\n \"noActivate\": false,\n \"project\": \"<string>\",\n \"reason\": \"<string>\",\n \"replaceRelease\": true,\n \"route\": \"<string>\",\n \"site\": \"<string>\",\n \"slug\": \"<string>\",\n \"uploadSession\": \"<string>\",\n \"visibility\": \"<string>\"\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:3000/api/v1/artifacts/publish")
.header("Content-Type", "application/json")
.body("{\n \"target\": \"<string>\",\n \"artifactVersion\": \"<string>\",\n \"assetBase\": \"<string>\",\n \"basePath\": \"<string>\",\n \"console\": \"<string>\",\n \"description\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"execute\": true,\n \"idempotencyKey\": \"<string>\",\n \"name\": \"<string>\",\n \"noActivate\": false,\n \"project\": \"<string>\",\n \"reason\": \"<string>\",\n \"replaceRelease\": true,\n \"route\": \"<string>\",\n \"site\": \"<string>\",\n \"slug\": \"<string>\",\n \"uploadSession\": \"<string>\",\n \"visibility\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/artifacts/publish")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"target\": \"<string>\",\n \"artifactVersion\": \"<string>\",\n \"assetBase\": \"<string>\",\n \"basePath\": \"<string>\",\n \"console\": \"<string>\",\n \"description\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"execute\": true,\n \"idempotencyKey\": \"<string>\",\n \"name\": \"<string>\",\n \"noActivate\": false,\n \"project\": \"<string>\",\n \"reason\": \"<string>\",\n \"replaceRelease\": true,\n \"route\": \"<string>\",\n \"site\": \"<string>\",\n \"slug\": \"<string>\",\n \"uploadSession\": \"<string>\",\n \"visibility\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"artifact": "<string>",
"artifactVersion": "<string>",
"authenticated": true,
"consoleUrl": "<string>",
"localSync": {
"reason": "package_source",
"status": "skipped"
},
"publish": "<string>",
"release": "<string>",
"routes": [
{}
],
"site": "<string>",
"success": true,
"upload": {
"attempted": 123,
"skipped": 123
},
"uploadSession": {},
"url": "<string>"
}Body
Local artifact id, file, or directory; use a directory with index.html for Pages
Local artifact version number (default: latest)
Package asset base intent
Package base path intent
Console base URL
Published artifact description
Package entrypoint path
Actually upload/release to Console; default is a dry-run that only shows the plan (exit 3)
Idempotency key for Console retries
Published artifact name
Create publish records without activating a site release
Console project id or slug
Release reason sent to Console
Replace the full active route map instead of merging
Site route path to mount the artifact at
Console site id or slug to release to
Published artifact slug
Use an existing Console upload session
Requested visibility: private|protected_link|public
Response
Success — body conforms to the @Returns schema.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes