Create viewpoint
POST
https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/viewpoints
Path Parameters
- topic-board-idstringrequiredExampleDescription
- topic-idstringrequiredExampleDescription
Query Parameters
- includeAuthorizationbooleanDescription
Body Parameters
- bodyobject
- guidstringExampleDescription
- bimsync_modelsobject[]Description
- modelRefstringExampleDescription
- revisionRefstringExampleDescription
- orthogonal_cameraobjectDescription
- camera_view_pointobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_directionobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_up_vectorobjectrequiredDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- view_to_world_scalenumberrequiredExampleDescription
- aspect_rationumberrequiredExampleDescription
- perspective_cameraobjectDescription
- camera_view_pointobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_directionobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_up_vectorobjectrequiredDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- field_of_viewnumberrequiredExampleDescription
- aspect_rationumberrequiredExampleDescription
- linesobject[]Description
- start_pointobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- end_pointobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- clipping_planesobject[]Description
- locationobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- directionobjectrequiredDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- bitmapsobject[]Description
- bitmap_typestring<jpg | png>requiredExampleDescription
- bitmap_datastringrequiredExampleDescription
- locationobjectrequiredDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- normalobjectrequiredDescription
- xnumberDescription
- ynumberExampleDescription
- znumberDescription
- upobjectrequiredDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- heightnumberrequiredExampleDescription
- snapshotobject
- snapshot_typestring<jpg | png>requiredExampleDescription
- snapshot_datastringrequiredExampleDescription
- componentsobjectDescription
- selectionobject[]Description
- ifc_guidstringExampleDescription
- originating_systemstringDescription
- authoring_tool_idstringDescription
- coloringobject[]Description
- colorstringrequiredExampleDescription
- componentsobject[]required
- ifc_guidstringExampleDescription
- originating_systemstringDescription
- authoring_tool_idstringDescription
- visibilityobjectrequired
- default_visibilitybooleanExampleDescription
- exceptionsobject[]Description
- ifc_guidstringExampleDescription
- originating_systemstringDescription
- authoring_tool_idstringDescription
- view_setup_hintsobject
- spaces_visiblebooleanExampleDescription
- space_boundaries_visiblebooleanExampleDescription
- openings_visiblebooleanExampleDescription
Responses
200
- viewpoint
- guidstringExampleDescription
- orthogonal_cameraobjectDescription
- camera_view_pointobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_directionobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_up_vectorobjectDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- view_to_world_scalenumberExampleDescription
- aspect_rationumberExampleDescription
- perspective_cameraobjectDescription
- camera_view_pointobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_directionobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- camera_up_vectorobjectDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- field_of_viewnumberExampleDescription
- aspect_rationumberExampleDescription
- linesobject[]Description
- start_pointobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- end_pointobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- clipping_planesobject[]Description
- locationobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- directionobjectDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- bitmapsobject[]Description
- guidstringExampleDescription
- bitmap_typestring<jpg | png>ExampleDescription
- locationobjectDescription
- xnumberExampleDescription
- ynumberExampleDescription
- znumberExampleDescription
- normalobjectDescription
- xnumberDescription
- ynumberExampleDescription
- znumberDescription
- upobjectDescription
- xnumberDescription
- ynumberDescription
- znumberExampleDescription
- heightnumberExampleDescription
- snapshotobject
- snapshot_typestring<jpg | png>ExampleDescription
- authorizationobject
- viewpoint_actionsstring[]Example
[ "delete" ]
Description
curl
curl --request POST \
--url https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/viewpoints \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"orthogonal_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"view_to_world_scale": 14,
"aspect_ratio": 1
},
"perspective_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"field_of_view": 60,
"aspect_ratio": 1
},
"lines": [
{
"start_point": {},
"end_point": {}
}
],
"clipping_planes": [
{
"location": {},
"direction": {}
}
],
"bitmaps": [
{
"bitmap_type": "png",
"bitmap_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC",
"location": {},
"normal": {},
"up": {},
"height": 20
}
],
"snapshot": {
"snapshot_type": "png",
"snapshot_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC"
},
"components": {
"coloring": [
{
"color": "#dddddd",
"components": [
{}
]
}
],
"visibility": {}
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"orthogonal_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"view_to_world_scale": 14,
"aspect_ratio": 1
},
"perspective_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"field_of_view": 60,
"aspect_ratio": 1
},
"lines": [
{
"start_point": {},
"end_point": {}
}
],
"clipping_planes": [
{
"location": {},
"direction": {}
}
],
"bitmaps": [
{
"bitmap_type": "png",
"bitmap_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC",
"location": {},
"normal": {},
"up": {},
"height": 20
}
],
"snapshot": {
"snapshot_type": "png",
"snapshot_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC"
},
"components": {
"coloring": [
{
"color": "#dddddd",
"components": [
{}
]
}
],
"visibility": {}
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/viewpoints", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/viewpoints")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"orthogonal_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"view_to_world_scale": 14,
"aspect_ratio": 1
},
"perspective_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"field_of_view": 60,
"aspect_ratio": 1
},
"lines": [
{
"start_point": {},
"end_point": {}
}
],
"clipping_planes": [
{
"location": {},
"direction": {}
}
],
"bitmaps": [
{
"bitmap_type": "png",
"bitmap_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC",
"location": {},
"normal": {},
"up": {},
"height": 20
}
],
"snapshot": {
"snapshot_type": "png",
"snapshot_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC"
},
"components": {
"coloring": [
{
"color": "#dddddd",
"components": [
{}
]
}
],
"visibility": {}
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/viewpoints"
payload = json.dumps({
"orthogonal_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"view_to_world_scale": 14,
"aspect_ratio": 1
},
"perspective_camera": {
"camera_view_point": {},
"camera_direction": {},
"camera_up_vector": {},
"field_of_view": 60,
"aspect_ratio": 1
},
"lines": [
{
"start_point": {},
"end_point": {}
}
],
"clipping_planes": [
{
"location": {},
"direction": {}
}
],
"bitmaps": [
{
"bitmap_type": "png",
"bitmap_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC",
"location": {},
"normal": {},
"up": {},
"height": 20
}
],
"snapshot": {
"snapshot_type": "png",
"snapshot_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC"
},
"components": {
"coloring": [
{
"color": "#dddddd",
"components": [
{}
]
}
],
"visibility": {}
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"guid": "52959166-dbd2-44eb-81bb-74f955f30e0f",
"orthogonal_camera": {
"camera_view_point": {
"x": 100,
"y": 100,
"z": 100
},
"camera_direction": {
"x": 100,
"y": 100,
"z": 100
},
"camera_up_vector": {
"x": 0,
"y": 0,
"z": 1
},
"view_to_world_scale": 14,
"aspect_ratio": 1
},
"perspective_camera": {
"camera_view_point": {
"x": 100,
"y": 100,
"z": 100
},
"camera_direction": {
"x": 100,
"y": 100,
"z": 100
},
"camera_up_vector": {
"x": 0,
"y": 0,
"z": 1
},
"field_of_view": 60,
"aspect_ratio": 1
},
"lines": [
{
"start_point": {
"x": 100,
"y": 100,
"z": 100
},
"end_point": {
"x": 200,
"y": 200,
"z": 200
}
}
],
"clipping_planes": [
{
"location": {
"x": 100,
"y": 100,
"z": 100
},
"direction": {
"x": 0,
"y": 0,
"z": 1
}
}
],
"bitmaps": [
{
"guid": "8c2f8818-e413-49d4-8978-7f7d95d2b27e",
"bitmap_type": "png",
"location": {
"x": 100,
"y": 100,
"z": 100
},
"normal": {
"x": 0,
"y": 1,
"z": 0
},
"up": {
"x": 0,
"y": 0,
"z": 1
},
"height": 20
}
],
"snapshot": {
"snapshot_type": "png"
},
"authorization": {
"viewpoint_actions": [
""
]
}
}