What is surface?

What is surface specially in CreateBrowserInput

Hi @Amerehei,

The surface property for elements is used when attaching an element to another element.

The surface will be the element that a shape is attached to. If you want to detach an element set the surface as the workspaceId.

The transform x, and y will be relative position of the surface element.

For example
In workspaceId:Sv1JUoiNcFzYhz3stnbt if you wanted to attach an existing shape element, id: 616a0e87cc71b8f25e1db45a to an existing browser element, id: 64dfd493283dcf1e211469cd as the surface with the shape at 100, 100 from the top left of the surface browser element:

curl --location --request PATCH 'https://api.apps.us.bluescape.com/v3/workspaces/Sv1JUoiNcFzYhz3stnbt/elements/616a0e87cc71b8f25e1db45a' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <yourToken>' \
--data '{
    "type": "Shape",
    "surface":"64dfd493283dcf1e211469cd",
    "transform":{
        "x":100,
        "y":100
    }
}'

to detach the shape from the browser surface, by setting the surface as the workspaceId

curl --location --request PATCH 'https://api.apps.us.bluescape.com/v3/workspaces/Sv1JUoiNcFzYhz3stnbt/elements/616a0e87cc71b8f25e1db45a' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <yourToken>' \
--data '{
    "type": "Shape",
    "surface":"Sv1JUoiNcFzYhz3stnbt",
    "transform":{
        "x":100,
        "y":100
    }
}'
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.