cURL
curl --request GET \
--url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}', 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}/pages/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"appInstances": [
{
"slug": "<string>",
"blocks": {
"Dialog Manager.config": {
"url": "https://cdn-assets.prisme.ai/widgets/nlu/setup-widget/main.js"
}
}
}
],
"name": {
"fr": "Bonjour",
"en": "Hello"
},
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"workspaceId": "<string>",
"workspaceSlug": "<string>",
"id": "<string>",
"blocks": [
{
"slug": "<string>",
"appInstance": "<string>",
"onInit": "<string>",
"updateOn": "<string>",
"automation": "<string>"
}
],
"labels": [
"<string>"
],
"events": {
"emit": [
"<string>"
],
"listen": [
"<string>"
],
"autocomplete": [
{
"event": "prismeaiMessenger.message",
"autocomplete": {}
}
]
},
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"permissions": {},
"customDomains": [
"<string>"
],
"checksum": "<string>",
"favicon": "<string>",
"styles": "<string>",
"onInit": "<string>",
"updateOn": "<string>",
"notifyOn": "<string>",
"automation": "<string>",
"public": true,
"apiKey": "<string>",
"clientId": "<string>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Prisme.ai Workspaces
Get v2workspaces pages
Fetch a page
GET
/
v2
/
workspaces
/
{workspaceId}
/
pages
/
{slug}
cURL
curl --request GET \
--url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}', 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}/pages/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/pages/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"appInstances": [
{
"slug": "<string>",
"blocks": {
"Dialog Manager.config": {
"url": "https://cdn-assets.prisme.ai/widgets/nlu/setup-widget/main.js"
}
}
}
],
"name": {
"fr": "Bonjour",
"en": "Hello"
},
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"workspaceId": "<string>",
"workspaceSlug": "<string>",
"id": "<string>",
"blocks": [
{
"slug": "<string>",
"appInstance": "<string>",
"onInit": "<string>",
"updateOn": "<string>",
"automation": "<string>"
}
],
"labels": [
"<string>"
],
"events": {
"emit": [
"<string>"
],
"listen": [
"<string>"
],
"autocomplete": [
{
"event": "prismeaiMessenger.message",
"autocomplete": {}
}
]
},
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"permissions": {},
"customDomains": [
"<string>"
],
"checksum": "<string>",
"favicon": "<string>",
"styles": "<string>",
"onInit": "<string>",
"updateOn": "<string>",
"notifyOn": "<string>",
"automation": "<string>",
"public": true,
"apiKey": "<string>",
"clientId": "<string>"
}{
"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.
Response
Success Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{ "fr": "Bonjour", "en": "Hello" }
Show child attributes
Show child attributes
Example:
{ "fr": "Bonjour", "en": "Hello" }
Show child attributes
Show child attributes
Pattern:
^[0-9A-Za-z._:-]{2,60}$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
auto, light, dark Indicates whether this page is public. Reflects page permissions and cannot be set directly
Was this page helpful?
⌘I