User Tools

Site Tools


webssphh_restful_service

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
webssphh_restful_service [2016/07/23 14:00] 100.3.200.49webssphh_restful_service [2016/07/24 06:02] – [Project] 100.3.200.49
Line 5: Line 5:
  
  
-''service.php?a={guid}&id=<uint>''+''service.php''
  
-Parameters:+| parameter | data type | values | definition | 
 +| a | string| s\\ u\\ i\\ d | SELECT RECORD (works with GET or POST)\\ UPDATE RECORD (works with POST only) \\ INSERT RECORD (works with POST only) \\ DELETE RECORD (works with GET or POST | 
 +| token | string | [\w\d]+ | A security token allowing authorized users only | 
 +| projects | none | none | Returns a JSON array of projects | 
 +| scenes | none | none | Returns a JSON array of scenes in the current project. This requires the ''project'' parameter to be set | 
 +| objects | none | none | Returns a JSON array of objects in the current project. This requires the ''project'' parameter to be set | 
 +| sobjects | none | none | Returns a JSON array of objects in the current scene. This requires the ''scene'' parameter to be set. | 
 +| project| number | 1 - 1048576 | Returns a JSON object with the project properties | 
 +| scene | number | 1 - 1048576 | Returns a JSON object with the scene properties. This requires the ''project'' parameter to be set. | 
 +| object | number | 1 - 1048576 | Returns a JSON object with the object properties. This requires the ''project'' parameter to be set.|
  
-''a'' +===== Schemas =====
-  * ''g'' GET +
-  * ''p'' PUT +
-  * ''i'' INSERT +
-  * ''d'' DELETE+
  
-| parameter | data type | values | meaning | +==== Projects ====
-| a | string| s | SELECT RECORD | +
-| | | u | UPDATE RECORD | +
-| | | i | INSERT RECORD | +
-| | | d | DELETE RECORD | +
-| token | string | [\w\d]+ | a security token allowing authorized users only |+
  
 +<code javascript>
 +"projects" : [
 + { "id" : number, "name" : string }, // Project
 + { "id" : number, "name" : string }, // Project
 + ...
 +]
 +</code>
 +
 +==== Scenes ====
 +
 +<code javascript>
 +"scenes" : [
 +  { "id" : number, "name" : string }, // Scene
 +  { "id" : number, "name" : string }, // Scene
 +  ...
 +]
 +</code>
 +
 +==== Objects ====
 +<code javascript>
 +"objects" : {
 +  { "id" : number, "name" : string, "type" : string }, // Object
 +  { "id" : number, "name" : string, "type" : string }, // Object
 +  ...
 +}
 +</code>
 +
 +==== Project ====
 +
 +<code javascript>
 +"project" : {
 +  "id"   : number, // PK
 +  "name" : string, // Project Name
 +  "desc" : string, // Description
 +  "key1" : { "type" : string, "value" : json }, // Property 1
 +  "key2" : { "type" : string, "value" : json }, // Property 2
 +  ...
 +}
 +</code>
 +
 +==== Scene ====
 +
 +<code javascript>
 +"scene" : {
 +  "id"   : number, // PK
 +  "name" : string, // Name of Scene
 +  "key1" : { "type" : string, "value" : json }, // Property 1
 +  "key2" : { "type" : string, "value" : json }, // Property 2
 +  ...
 +}
 +</code>
 +
 +
 +==== Object ====
 +
 +The types of objects are
 +  * ''camera''
 +  * ''environment''
 +  * ''pointlight''
 +  * ''mesh''
 +  * ''sphere''
 +  * ''mtllib''
 +  * ''renderconfig''
 +
 +<code javascript>
 +"object" : {
 +  "id"   : number, // PK
 +  "name" : string, // Name of the object
 +  "type" : string, // Type of the object
 +  "key1" : { "type" : string, "value" : json }, // Property 1
 +  "key2" : { "type" : string, "value" : json }, // Property 2
 +  ...
 +}
 +</code>
 +
 +===== Common Types of Properties =====
 +
 +==== Special Types ====
 +
 +^Typename  ^JSON |
 +| ''string'' | ''string'' |
 +| ''integer''| ''integer''|
 +| ''double'' | ''double'' |
 +| ''AffineMatrix4'' | ''[a11, a12, a13, a14,\\ a21, a22, a23, a24,\\ a31, a32, a33, a34]'' |
 +| ''Matrix2'' | ''[a11, a12, a21, a22]'' |
 +| ''Matrix3'' | ''[a11, a12, a13,\\ a21, a22, a23,\\ a31, a32, a33]'' |
 +| ''Matrix4'' | ''[a11, a12, a13, a14,\\ a21, a22, a23, a24,\\ a31, a32, a33, a34,\\ a41, a42, a43, a44]'' |
 +| ''Matrix2x3'' | ''[a11, a12,\\ a21, a22,\\ a31, a32]'' |
 +| ''Matrix2x4'' | ''[a11, a12,\\ a21, a22,\\ a31, a32,\\ a41, a42]'' |
 +| ''Matrix3x2'' | ''[a11, a12, a13,\\ a21, a22, a23]'' |
 +| ''Matrix3x4'' | ''[a11, a12, a13,\\ a21, a22, a23,\\ a31, a32, a33,\\ a41, a42, a43]'' |
 +| ''Vector2'' | ''[x, y]'' |
 +| ''Vector3'' | ''[x, y, z]'' |
 +| ''Vector4'' | ''[x, y, z, w]'' |
 +| ''Color3''  | ''[r, g, b]'' |
 +| ''Color4''  | ''[r, g, b, a]'' |
 +| ''Quaternion'' | ''[a, b, c, d]'' |
 +
 +==== Normal Types ====
 +
 +=== Object ===
 +
 +^Typename ^JSON/Type |
 +| ''worldMatrix'' | ''Matrix4'' |
 +| ''usemtl'' | string |
 +| ''mesh'' | string |
 +
 +=== Point Light ===
 +
 +^Typename ^JSON/Type |
 +| ''worldMatrix'' | ''Matrix4'' |
 +| ''position''    | ''Vector4'' |
 +| ''radius''      | number |
 +| ''E0''          | ''Color3'' |
webssphh_restful_service.txt · Last modified: 2023/09/22 16:50 by microwerx

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki