@User{
id: @string,
username: @string,
password: @string,
email: @string
}
@Project{
id: @string,
userIds: array(@string),
primary: @string,
name: @string,
image: @string,
description: @string,
db_name: @string
}
@Layout{
w : @int,
h : @int,
x : @int,
y : @int,
i : @string,
minW : @int,
minH : @int,
moved : boolean,
static : boolean
}
@Collection{
refId : @string
viewId: @string,
altsid : array(@string),
collectionName : @string,
text : @string,
tags : array(@string),
viewType : Enum{1:"file view", 2:"parallel view", 3:"list view"},
isSinked: @boolean,
err : @boolean,
status : Enum{"ACTIVE":"alt exists", "DELETED":"alt was removed"}
collectionNameView: @string
}
@CollectionWithLayout{
refId : @string
viewId: @string,
altsid : array(@string),
collectionName : @string,
text : @string,
tags : array(@string),
viewType : Enum{1:"file view", 2:"parallel view", 3:"list view"},
isSinked: @boolean,
err : @boolean,
status : Enum{"ACTIVE":"alt exists", "DELETED":"alt was removed"}
collectionNameView: @string,
layout: @Layout
}
@CollectionWithKeySets{
refId : @string
viewId: @string,
altsid : array(@string),
collectionName : @string,
text : @string,
tags : array(@string),
viewType : Enum{1:"file view", 2:"parallel view", 3:"list view"},
isSinked: @boolean,
err : @boolean,
status : Enum{"ACTIVE":"alt exists", "DELETED":"alt was removed"}
collectionNameView: @string,
keySets:array(@string),
isInput:array(@boolean)
}
@Attribute{
key: @string,
value: @int,
typeName : Enum{},
isInput: @boolean,
ordered : @boolean,
max : @int,
min : @int,
step : @int
}
@Alternative{
_id : @string,
refId : @string,
viewId: @string,
collectionViewId: @string,
collectionRefId: @string,
image: @string,
xml: @string,
gltf: @string,
geometry: @string,
collectionName: @string,
RhinoFile: @string,
tags: array(@string),
attributes: array(@Attributes),
history: array(@string),
parents: array(@string),
status : Enum{"ACTIVE":"alt exists", "DELETED":"alt was removed"}
}
AlternativeDetailed{
_id : @string,
refId : @string,
viewId: @string,
collectionViewId: @string,
collectionRefId: @string,
image: @string,
xml: @string,
gltf: @string,
geometry: @string,
collectionName: @string,
RhinoFile: @string,
tags: array(@string),
params: @Dictionary(input:value),
outputs: @Dictionary(output:value),
}
@AlternativeShort{
refId : @string,
viewId: @string,
image: @string
}
@File{
id : @string,
refId : @string,
filename : @string,
data : @string,
type : @string,
err : @boolean
}
Url: /user/login
Method: POST
Description: it logs in to an existing account
Headers:{
}
Body:{
username:@string,
password:@string
}
Response:{
success:@boolean,
user:@User
}
Url: /user/register
Method: POST
Description: it creates a new account
Headers:{
}
Body:{
username:@string,
password:@string
}
Response:{
success:@boolean,
user:@User
}
Url: /project
Method: GET
Description: it fethes all the projects
Headers:{
userid:@string
}
Body:{
}
Response:{
success:@boolean,
projects:array(@Project),
db_loaded:@boolean
}
Url: /project
Method: POST
Description: it creates a new projecct
Headers:{
userid:@string
}
Body:{
name:@string,
description:@string
}
Response:{
success:@boolean,
projects:array(@Project),
db_loaded:@boolean
}
Url: /project/select
Method: POST
Description: it selects a new projecct
Headers:{
userid:@string
}
Body:{
id:@string
}
Response:{
success:@boolean,
project:@Project
}
Url: /project
Method: PUT
Description: it updates a new projecct
Headers:{
userid:@string
}
Body:{
projects:array(@Project)
}
Response:{
success:@boolean,
projects:array(@Project)
}
Url: /layout
Method: Get
Description: it fetches all the layouts
Headers:{
userid:@string,
projectid:@string
}
Body:{
}
Response:{
layout:array(@Layout)
}
Url: /collections
Method: GET
Description: it fetches all the collections or the specified ones
Headers:{
userid:@string,
projectid:@string
}
Body: array(@string) (optional)
Response:array(@CollectionWithKeySets)
Url: /collections
Method: POST
Description: it creates a new collection or the specified number of collections
Headers:{
userid:@string,
projectid:@string
}
Body:{
numberOfCollections:@int
}
Response:array(@Collection)
Url: /collections
Method: PUT
Description: it updates specified collections
Headers:{
userid:@string,
projectid:@string
}
Body:array(@Collection)
Response:array(@collection)
Url: /collections/renaming
Method: PUT
Description: it renames specified collections
Headers:{
userid:@string,
projectid:@string
}
Body:array(@Collection)
Response:array(@collection)
Url: /collections
Method: DELETE
Description: it removes specified collections
Headers:{
userid:@string,
projectid:@string
}
Body:array(@int)
Response:{
success:@boolean
}
Url: /collections/copy/ref
Method: POST
Description: it copies collections with refrence to the original collections
Headers:{
userid:@string,
projectid:@string
}
Body:array(@CollectionWithLayout)
Response:array({
alternatives:array(@AlternativeDetailed),
collections:array(@CollectionWithKeySets)
})
Url: /collections/clone
Method: POST
Description: it clones collections with no refrence to the original collections. The alternatives inside the collection will have refrence to the original alternatives.
Headers:{
userid:@string,
projectid:@string
}
Body:array(@CollectionWithLayout)
Response:array({
alternatives:array(@AlternativeDetailed),
collections:array(@CollectionWithKeySets)
})
Url: /collections/clone/deep
Method: POST
Description: it clones collections with no refrence to the original collections. The alternatives inside the collection will not have refrence to the original alternatives.
Headers:{
userid:@string,
projectid:@string
}
Body:array(@CollectionWithLayout)
Response:array({
alternatives:array(@AlternativeDetailed),
collections:array(@CollectionWithKeySets)
})
Url: /collections/sink
Method: POST
Description: it puts a collection into the sink
Headers:{
userid:@string,
projectid:@string
}
Body:{
collectionId:@string
}
Response:{
success:@boolean
}
Url: /computeCP
Method: POST
Description: Check the description here
Headers:{
userid:@string,
projectid:@string
}
Body:{
collectionId:@string
}
Response:{
success:@boolean
}
Url: /clean-db?projectId=
Method: Get
Description: it removes everything in a project
Body:{}
Response:{
success:@boolean
}