3DSpaces API¶
Create¶
- POST /space¶
Used to create a space with a randomly generated id in the ‘default’ namespace.
- Status Codes
200 OK –
Success
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "spaceID": "default/a72efb04-8121-4d66-99f9-6b34e53e92d6" }
This can occur if requesting a session handler or encoding the response message fails.
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 failed to encode create space reply: ...
- POST /space/{namespace}¶
Used to create a space with a randomly generated id in the given namespace.
- Parameters
namespace (string) –
- Status Codes
200 OK –
Success
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "spaceID": "myNamespace/a72efb04-8121-4d66-99f9-6b34e53e92d6" }
Check for path parameters failed.
Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 parameters are missing in path, expected: /space/{namespace}
This can occur if requesting a session handler or encoding the response message fails.
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 failed to encode create space reply: ...
- POST /space/{namespace}/{id}¶
Used to create a space with the given id in the given namespace.
- Parameters
namespace (string) –
id (string) –
- Status Codes
200 OK –
Success
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "spaceID": "myNamespace/myID" }
Check for path parameters failed.
Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 parameters are missing in path, expected: /space/{namespace}/{id}
This can occur if requesting a session handler or encoding the response message fails.
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 failed to encode create space reply: ...
Load¶
- GET /space/{namespace}/{id}¶
Redirects to WebVis with the given spaceID as a starting parameter.
- Parameters
namespace (string) –
id (string) –
Example request:
GET /space/{namespace}/{id} HTTP/1.1 Host: example.com
- Status Codes
302 Found – Redirect to WebVis with spaceID.
Check for path parameters failed.
Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 parameters are missing in path, expected: /space/{namespace}/{id}
Modify¶
- POST /space/{namespace}/{id}/add¶
Used to add a model to the given space.
- Parameters
namespace (string) –
id (string) –
- Query Parameters
parent (integer) –
root (string) –
label (string) –
Example request:
POST /space/{namespace}/{id}/add HTTP/1.1 Host: example.com Content-Type: application/json { "url": "urn:x-i3d:shape:sphere" }
- Status Codes
200 OK –
Successfully added the model to the instance graph addressable by the returned ‘nodeId’.
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "nodeId": 1, "transactionId": 6 }
An error related to the parameters given.
Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 url is missing in body
Something failed internally while processing the add call.
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 failed to do upload request: ...
- POST /space/{namespace}/{id}/setProperty¶
Used to change the property of the given nodes in the space.
- Parameters
namespace (string) –
id (string) –
Example request:
POST /space/{namespace}/{id}/setProperty HTTP/1.1 Host: example.com Content-Type: application/json { "nodeId": [ 1 ], "property": "enabled", "value": true }
- Status Codes
200 OK – Success in setting the property of the given ‘nodeIDs’.
An error related to the parameters given.
Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 failed to decode request body: ...
Something failed internally while processing the setProperty call.
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 failed to do setProperty: ...