cURL
curl --request POST \
--url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"name": "<string>",
"createdAt": "<string>",
"repository": {
"id": "<string>"
}
}
'import requests
url = "https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions"
payload = {
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"name": "<string>",
"createdAt": "<string>",
"repository": { "id": "<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({
description: {fr: 'Bonjour', en: 'Hello'},
name: '<string>',
createdAt: '<string>',
repository: {id: '<string>'}
})
};
fetch('https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions', 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.eda.prisme.ai/v2/workspaces/{workspaceId}/versions",
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([
'description' => [
'fr' => 'Bonjour',
'en' => 'Hello'
],
'name' => '<string>',
'createdAt' => '<string>',
'repository' => [
'id' => '<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://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions"
payload := strings.NewReader("{\n \"description\": {\n \"fr\": \"Bonjour\",\n \"en\": \"Hello\"\n },\n \"name\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"repository\": {\n \"id\": \"<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://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": {\n \"fr\": \"Bonjour\",\n \"en\": \"Hello\"\n },\n \"name\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"repository\": {\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions")
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 \"description\": {\n \"fr\": \"Bonjour\",\n \"en\": \"Hello\"\n },\n \"name\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"repository\": {\n \"id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"processing": true,
"message": "<string>"
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Prisme.ai Workspaces
Post v2workspaces versions
Publish a new workspace version
POST
/
v2
/
workspaces
/
{workspaceId}
/
versions
cURL
curl --request POST \
--url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"name": "<string>",
"createdAt": "<string>",
"repository": {
"id": "<string>"
}
}
'import requests
url = "https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions"
payload = {
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"name": "<string>",
"createdAt": "<string>",
"repository": { "id": "<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({
description: {fr: 'Bonjour', en: 'Hello'},
name: '<string>',
createdAt: '<string>',
repository: {id: '<string>'}
})
};
fetch('https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions', 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.eda.prisme.ai/v2/workspaces/{workspaceId}/versions",
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([
'description' => [
'fr' => 'Bonjour',
'en' => 'Hello'
],
'name' => '<string>',
'createdAt' => '<string>',
'repository' => [
'id' => '<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://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions"
payload := strings.NewReader("{\n \"description\": {\n \"fr\": \"Bonjour\",\n \"en\": \"Hello\"\n },\n \"name\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"repository\": {\n \"id\": \"<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://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": {\n \"fr\": \"Bonjour\",\n \"en\": \"Hello\"\n },\n \"name\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"repository\": {\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/versions")
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 \"description\": {\n \"fr\": \"Bonjour\",\n \"en\": \"Hello\"\n },\n \"name\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"repository\": {\n \"id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"processing": true,
"message": "<string>"
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Authorizations
BearerAuthWorkspaceApiKeyAuthBearerAuth & WorkspaceApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace id
Query Parameters
Timeout (seconds)
Body
application/json
Was this page helpful?
⌘I