-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoas_spec.yaml
More file actions
7425 lines (7329 loc) · 235 KB
/
oas_spec.yaml
File metadata and controls
7425 lines (7329 loc) · 235 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Geometry Backend API v2
description: |-
The ShapeDiver Geometry Backend system is used to:
* host Grasshopper models in a secure, reliable, scalable, and performant way,
* run computations of Grasshopper models,
* and cache and output the results of computations and exports.
version: 2.3.0
externalDocs:
description: ShapeDiver Help Center
url: https://help.shapediver.com/doc/
tags:
- name: analytics
- name: ar-scene
- name: assets
- name: auth
- name: auth-group
- name: export
externalDocs:
url: https://help.shapediver.com/doc/exports-on-the-api
- name: file
- name: gltf
- name: log
- name: model
- name: model-state
- name: output
externalDocs:
url: https://help.shapediver.com/doc/outputs-on-the-api
- name: script
- name: sdtf
externalDocs:
url: https://help.shapediver.com/doc/sdtf-structured-data-transfer-format
- name: session
externalDocs:
url: https://help.shapediver.com/doc/sessions-and-their-lifetime
- name: system
- name: texture
###############################################################################
# Components #
###############################################################################
components:
schemas:
#-------------------------------------------------------------------------#
#- Custom data types -#
#-------------------------------------------------------------------------#
AnyDateTime:
# Cannot combine the other types since string pattern matching within `oneOf` is not
# supported by all generators.
# TODO: Check again in OAS 3.1!
description: >-
An ISO-8601 (partial) date with an optional (partial) timestamp, in numeric format.
Formats:
* YYYY
* YYYYMM
* YYYYMMDD
* YYYYMMDDhh
* YYYYMMDDhhmm
* YYYYMMDDhhmmss
* YYYYMMDDhhmmsszzz
type: string
pattern: '^(\d{4}|\d{6}|\d{8}|\d{10}|\d{12}|\d{14}|\d{17})$'
example: 20240521
AnyDateExtended:
# Cannot combine the other types since string pattern matching within `oneOf` is not
# supported by all generators.
# TODO: Check again in OAS 3.1!
description: >-
An ISO-8601 (partial) date with an optional hour timestamp, in numeric format.
Formats:
* YYYY
* YYYYMM
* YYYYMMDD
* YYYYMMDDhh
type: string
pattern: '^(\d{4}|\d{6}|\d{8}|\d{10})$'
example: 20240521
Base64Data:
type: string
description: A base64-encoded string.
FullDate:
description: |-
An ISO-8601 date, in numeric format.
Format: YYYYMMDD
type: string
pattern: '^\d{8}$'
example: 20240521
DateHour:
description: |-
An ISO-8601 date with hours, in numeric format.
Format: YYYYMMDDhh
type: string
pattern: '^\d{10}$'
example: 2024052114
DateHourMinute:
description: |-
An ISO-8601 date with hours and minutes, in numeric format.
Format: YYYYMMDDhhmm
type: string
pattern: '^\d{12}$'
example: 202405211407
DateTime:
description: |-
An ISO-8601 date-time without milliseconds, in numeric format.
Format: YYYYMMDDhhmmss
type: string
pattern: '^\d{14}$'
example: 20240521140735
DateTimeMs:
description: |-
A ISO-8601 date-time, in numeric format.
Format: YYYYMMDDhhmmsszzz
type: string
pattern: '^\d{17}$'
example: 20240521140735123
DateTimeIso:
description: |-
A ISO-8601 date-time.
Format: YYYY-MM-DDThh:mm:ss.zzzZ
type: string
pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$'
example: 2024-05-21T14:07:35.123Z
Epoch:
description: A Unix timestamp in seconds.
type: string
pattern: '^\d{10}$'
example: 1708585395
EpochMs:
description: A Unix timestamp in milliseconds.
type: string
pattern: '^\d{13}$'
example: 1708585395633
NullObj:
description: A substitution for the JSON-value `null`.
type: object
properties:
nullObj:
description: The value of this property does not matter.
type: boolean
required:
- nullObj
nullable: true
OctetStream:
type: string
format: binary
Year:
description: |-
An ISO-8601 year.
Format: YYYY
type: string
pattern: '^\d{4}$'
example: 2024
YearMonth:
description: |-
An IOS-8601 date with years and months, in numeric format.
Format: YYYYMM
type: string
pattern: '^\d{6}$'
example: 202405
#-------------------------------------------------------------------------#
#- Composite custom data types -#
#-------------------------------------------------------------------------#
AnyValue:
description: Can be any value - string, number, boolean, array or object.
anyOf:
- type: string
- type: number
- type: integer
- type: boolean
- type: array
items: {}
- type: object
#-------------------------------------------------------------------------#
#- Common data structures -#
#-------------------------------------------------------------------------#
CommonsComputationStatus: &CommonsComputationStatus
description: Status of a model computation.
type: string
enum:
- success
- timeout
- checkconfirmed
- checkdenied
- checkpending
- maxcombinedassetsizeexceeded
- maxdbsizeperoutputexceeded
- maxpartsperoutputexceeded
- maxassetpartsperoutputexceeded
- maxtransformationsperoutputexceeded
- maxpartsexceeded
- maxassetpartsexceeded
- recoverableerror
- unrecoverableerror
- nooutputdatafordefaultparametervalues
- modelwithoutgeometryoutput
- unknown
x-enum-varnames:
- SUCCESS
- TIMEOUT
- CHECK_CONFIRMED
- CHECK_DENIED
- CHECK_PENDING
- MAX_COMBINED_ASSET_SIZE_EXCEEDED
- MAX_DB_SIZE_PER_OUTPUT_EXCEEDED
- MAX_PARTS_PER_OUTPUT_EXCEEDED
- MAX_ASSET_PARTS_PER_OUTPUT_EXCEEDED
- MAX_TRANSFORMATIONS_PER_OUTPUT_EXCEEDED
- MAX_PARTS_EXCEEDED
- MAX_ASSET_PARTS_EXCEEDED
- RECOVERABLE_ERROR
- UNRECOVERABLE_ERROR
- NO_OUTPUT_DATA_FOR_DEFAULT_PARAMETER_VALUES
- MODEL_WITHOUT_GEOMETRY_OUTPUT
- UNKNOWN
CommonsGroup: &CommonsGroup
description: Group of a parameter, export or output.
type: object
properties:
id:
type: string
name:
type: string
required:
- id
- name
CommonsModelBlockingReasons: &CommonsModelBlockingReasons
description: Reasons why the model may be blocked.
type: object
properties:
creditLimit:
description: The model owner's credit limit has been exceeded.
type: boolean
owner:
description: The model has been blocked explicitly by its owner.
type: boolean
backendPermission:
description: The model owner has been restricted from accessing this backend system
type: boolean
CommonsModelStatus: &CommonsModelStatus
description: Status of a model.
type: string
enum:
- unknown
- not_uploaded
- uploaded
- pending
- confirmed
- denied
- deleted
x-enum-varnames:
- UNKNOWN
- NOT_UPLOADED
- UPLOADED
- PENDING
- CONFIRMED
- DENIED
- DELETED
CommonsBasicParameter: &CommonsBasicParameter
description: Definition of a basic ShapeDiver parameter.
oneOf:
- type: string
- type: number
- type: boolean
CommonsStypeParameter: &CommonsStypeParameter
description: Definition of the value to use for s-type parameters.
type: object
properties:
value:
description: Optional embedded value. If this is set the asset is ignored.
type: string
asset:
title: CommmonsParameterAsset
description: Reference to the s-type parameter asset to be used.
type: object
properties:
id:
description: String ID of the asset.
type: string
chunk:
title: CommonsParameterChunk
description: >-
Describing which chunk of the s-type asset to use. When not specified, the
chunk of an asset gets chosen based on parameter ID and name.
type: object
properties:
id:
description: ID of the chunk to be used.
type: string
name:
description: Name attribute of the chunk to be used.
type: string
required:
- id
CommonsTicket:
description: Authorization ticket.
type: object
properties:
accessdomains:
description: List of domains (origins) this ticket should be limited to; may be empty.
type: array
items:
type: string
author:
description: >-
Should this ticket provide access to model authoring (allows to change configuration)?
type: boolean
pub:
description: >-
Should this ticket allow public access (ignore the model's `accessdomains` property)?
type: boolean
until:
description: The timestamp until which the ticket should be valid.
allOf:
- $ref: "#/components/schemas/DateTime"
use_id2:
description: >-
Does this ticket identify the model via its secondary ID (model property `id2`)?
type: boolean
required:
- pub
- until
CommonsTicketType: &CommonsTicketType
description: Type of a ticket.
type: string
enum: [backend, ""]
x-enum-varnames: [BACKEND, NONE]
#-------------------------------------------------------------------------#
#- Query types -#
#-------------------------------------------------------------------------#
QueryComputationStatisticsStatus:
description: Filter by model computation statistics status.
type: string
enum:
- success
- timeout
- other
- "*"
x-enum-varnames:
- SUCCESS
- TIMEOUT
- OTHER
- ALL
QueryComputationStatus:
<<: *CommonsComputationStatus
description: Filter by model computation status.
QueryComputationType:
description: Filter by computation type.
type: string
enum:
- computation
- export
- load
- "*"
x-enum-varnames:
- COMPUTATION
- EXPORT
- LOAD
- ALL
QueryGltfConversion:
description: |-
Conversion type of a glTF upoad:
* `none`: no further processing of the file.
* `usdz`: converts the glTF into the USDZ format.
* `scene`: creates a temporary AR scene that holds both, a glTF and a USDZ file.
type: string
enum: [none, scene, usdz]
x-enum-varnames: [NONE, SCENE, USDZ]
QueryModelStatus:
<<: *CommonsModelStatus
description: Filter by model status.
QueryOrder:
description: Specifies the order of the results.
type: string
enum: [asc, desc]
x-enum-varnames: [ASC, DESC]
#-------------------------------------------------------------------------#
#- Request data structures -#
#-------------------------------------------------------------------------#
ReqGroup:
<<: *CommonsGroup
ReqTicket:
description: Body of a ticket request.
allOf:
- $ref: "#/components/schemas/CommonsTicket"
- type: object
properties:
type:
$ref: "#/components/schemas/ReqTicketType"
required:
- type
ReqTicketType:
<<: *CommonsTicketType
description: The type of the ticket.
ReqConfigure:
description: |-
Body of a configure request.
A dictionary of string keys and values of any type.
type: object
additionalProperties: true
ReqLogLevel:
description: Log message level for log requests.
type: string
enum: [0, 1, 2]
x-enum-varnames: [INFO, WARN, ERROR]
ReqLogMessage:
description: Body of a log message request.
type: object
properties:
level:
$ref: "#/components/schemas/ReqLogLevel"
message:
description: The message that should be logged.
type: string
required:
- level
- message
ReqAuthorizationGroup:
description: Body of an authorization group request.
type: object
properties:
models:
description: The model IDs that should form the new authorization group.
type: array
items:
type: string
users:
description: The user IDs that should form the new authorization group.
type: array
items:
type: string
organizations:
description: The organization IDs that should form the new authorization group.
type: array
items:
type: string
ReqModelStatistics:
description: >-
Body of a model statistics request. Every request-item results in exactly one
response-item, whereby the order of response-items corresponds to the order of the
request-items.
type: object
properties:
parameters:
type: array
items:
title: ReqModelStatistic
description: >-
Parameters of a single model-session analytics request. When multiple model IDs or
timestamps are requested, the resulting response-item represents an aggregation of
the requested data.
type: object
properties:
modelid:
type: array
items:
type: string
timestamp:
description: >-
Either a single extended date or an array of extended dates.
Multiple timestamps are aggregated and result in a single statistic object.
type: array
items:
$ref: "#/components/schemas/AnyDateExtended"
timestamp_from:
description: >-
Allows to define the beginning of a time range, instead of specifying individual
timestamps.
allOf:
- $ref: "#/components/schemas/AnyDateExtended"
timestamp_to:
description: >-
Allows to define the ending of a time range, instead of specifying individual
timestamps.
allOf:
- $ref: "#/components/schemas/AnyDateExtended"
required:
- modelid
required:
- parameters
ReqAnyCreditMetricId:
description: >-
Either a single or multiple IDs. Multiple IDs are aggregated and result in a single credit
metrics object.
oneOf:
- title: ReqModelCreditMetricId
description: Model metrics
type: object
properties:
modelIds:
type: array
items:
type: string
required:
- modelIds
- title: ReqUserCreditMetricId
description: User metrics
type: object
properties:
userIds:
type: array
items:
type: string
required:
- userIds
- title: ReqOrganizationCreditMetricId
description: Organization metrics
type: object
properties:
orgIds:
type: array
items:
type: string
required:
- orgIds
- title: ReqSystemCreditMetricId
description: System-wide metrics
type: object
properties:
systems:
type: boolean
required:
- systems
- title: ReqModelUserCreditMetricId
description: Model-User metrics
type: object
properties:
modelIds:
type: array
items:
type: string
userIds:
type: array
items:
type: string
required:
- modelIds
- userIds
- title: ReqModelOrganizationCreditMetricId
description: Model-Organization metrics
type: object
properties:
modelIds:
type: array
items:
type: string
orgIds:
type: array
items:
type: string
required:
- modelIds
- orgIds
ReqCreditMetrics:
description: >-
Body of a credit metrics request. Every request-item results in exactly one response-item,
whereby the order of response-items corresponds to the order of the request-items.
type: object
properties:
parameters:
type: array
items:
title: ReqCreditMetric
description: >-
Parameters of a credit metrics request. When IDs or timestamps are requested, the
resulting response-item represents an aggregation of the requested data.
type: object
properties:
id:
$ref: "#/components/schemas/ReqAnyCreditMetricId"
timestamp:
description: >-
Either a single extended date or an array of extended dates.
Multiple timestamps are aggregated and result in a single credit metrics object.
type: array
items:
$ref: "#/components/schemas/AnyDateExtended"
timestamp_from:
description: >-
Allows to define the beginning of a time range, instead of specifying individual
timestamps.
allOf:
- $ref: "#/components/schemas/AnyDateExtended"
timestamp_to:
description: >-
Allows to define the ending of a time range, instead of specifying individual
timestamps.
allOf:
- $ref: "#/components/schemas/AnyDateExtended"
required:
- id
required:
- parameters
ReqBasicParameter:
<<: *CommonsBasicParameter
ReqStypeParameter:
<<: *CommonsStypeParameter
ReqParameterValue:
description: The value of a single model parameter.
oneOf:
- $ref: "#/components/schemas/ReqBasicParameter"
- $ref: "#/components/schemas/ReqStypeParameter"
ReqCustomization:
description: |-
A directory of parameter keys and values.
Supported parameter keys are as follows, whereby the parameter resolution is done in the
same order as the keys are listed:
* `id`
* `name`
* `displayname`
Supported parameter values are:
* Basic parameter (`ReqBasicParameter`)
* S-type parameter (`ReqStypeParameter`)
type: object
additionalProperties:
$ref: "#/components/schemas/ReqParameterValue"
ReqExport:
description: Body of an export request.
type: object
properties:
parameters:
$ref: "#/components/schemas/ReqCustomization"
exports:
type: array
items:
type: string
outputs:
type: array
items:
type: string
max_wait_time:
description: >-
Maximum amount of milliseconds to wait for completion of export request before
responding.
type: integer
minimum: 0
required:
- parameters
- exports
ReqExportDefinitions:
description: Definition of a exports. A directory of export-IDs and export-definitions.
type: object
additionalProperties:
$ref: "#/components/schemas/ReqExportDefinition"
ReqExportDefinition:
description: Data for a single export definition.
type: object
properties:
displayname:
description: Parameter name to display instead of _name_.
type: string
group:
title: ReqExportDefinitionGroup
description: >-
Set to `null` or `NullObj` to remove the export from the currently assigned group.
oneOf:
- $ref: "#/components/schemas/ReqGroup"
- $ref: "#/components/schemas/NullObj"
hidden:
description: Controls whether the export should be hidden in the UI.
type: boolean
order:
description: Ordering of the export in client applications.
type: integer
tooltip:
description: Description that is shown as a tooltip in the clients.
type: string
ReqOutputDefinitions:
description: Definition of outputs. A directory of output-IDs and output-definitions.
type: object
additionalProperties:
$ref: "#/components/schemas/ReqOutputDefinition"
ReqOutputDefinition:
description: Data for a single output definition.
type: object
properties:
displayname:
description: Parameter name to display instead of `name`.
type: string
group:
title: ReqOutputDefinitionGroup
description: >-
Set to `null` or `NullObj` to remove the export from the currently assigned group.
oneOf:
- $ref: "#/components/schemas/ReqGroup"
- $ref: "#/components/schemas/NullObj"
hidden:
description: Controls whether the output should be hidden in the UI.
type: boolean
order:
description: Ordering of the output in client applications.
type: integer
tooltip:
description: Description that is shown as a tooltip in the clients.
type: string
chunks:
description: >-
The chunk definitions of the sdTF file that is generated by the output. If specified,
all existing sdTF chunks of the output must be given. The order of the given chunk
items determines the order in that the chunks will be shown in the UI.
type: array
items:
title: ReqOutputDefinitionChunk
description: >-
Definition of a single "chunk" of data in an sdTF file that is generated by the
output component.
type: object
properties:
id:
description: ID of the chunk.
type: string
displayname:
description: >-
Chunk name to display instead of the chunk `name`. This value can be unset by
specifying an empty string.
type: string
hidden:
description: Controls whether the chunk should be hidden in the UI.
type: boolean
required:
- id
ReqCache:
description: >-
Body of an export or output cache request. A directory of export-/output-IDs and
version-IDs.
type: object
additionalProperties:
type: string
example:
"96ce38f8-e197-416a-b78b-18d8376f5903": "62b3e13f-7b78-4a59-86f9-4a51f83feb21"
ReqExportOrCache:
description: Either a cache or an export request.
oneOf:
- $ref: "#/components/schemas/ReqCache"
- $ref: "#/components/schemas/ReqExport"
ReqCustomizationOrCache:
description: Either a cache or a customization request.
oneOf:
- $ref: "#/components/schemas/ReqCache"
- $ref: "#/components/schemas/ReqCustomization"
ReqCustomizationOrExport:
oneOf:
- $ref: "#/components/schemas/ReqCustomization"
- $ref: "#/components/schemas/ReqExport"
ReqModelState:
description: Description of a Model-State.
type: object
properties:
parameters:
$ref: "#/components/schemas/ReqCustomization"
data:
description: Optional untyped data that can be used to store additional information.
type: object
additionalProperties: true
image:
description: >-
Details of the Model-State image file. If provided, the response will include a URL
for uploading the file.
allOf:
- $ref: "#/components/schemas/ReqFileDefinition"
arSceneId:
description: >-
The ID of an existing AR scene associated with this model. If provided, the scene's
glTF and USDZ data will be duplicated into the newly created Model-State.
type: string
required:
- parameters
ReqModelFileType:
description: Supported Grasshopper file types for models.
type: string
enum: [gh, ghx]
x-enum-varnames: [GRASSHOPPER_BINARY, GRASSHOPPER_XML]
ReqTrustLevel:
description: Level of trust granted for a model.
type: string
enum: ["", none, full]
x-enum-varnames: [UNDEFINED, NONE, FULL]
ReqModel:
description: Body of a template request.
type: object
properties:
accessdomains:
description: >-
List of domains (origins) this model is limited to (is ignored in case `pub` is true).
type: array
items:
type: string
allowed_libraries:
description: List of allowed Grasshopper libraries.
type: array
items:
type: string
auth_groups:
description: List of allowed auth-groups.
type: array
items:
type: string
backendaccess:
description: Should backend access to the model be allowed.
type: boolean
blockingReasons:
title: ReqModelBlockingReasons
<<: *CommonsModelBlockingReasons
filename:
description: Original name of the model's grasshopper file.
type: string
ftype:
description: File type of the model.
allOf:
- $ref: "#/components/schemas/ReqModelFileType"
initial_warmup:
description: >-
Allows to control whether the model should be warmed up immediately after loading by
running a computation. This increases the likelihood of following computation requests
to be faster.
type: boolean
id2:
description: Optional second model ID.
type: string
max_comp_time:
description: Maximum number of milliseconds allowed for computations of this model.
type: integer
minimum: 0
max_export_size:
description: >-
Maximum number of bytes allowed to be exported from a model for a specific set of
parameter values.
type: integer
minimum: 0
max_idle_minutes:
description: |-
Maximum amount of minutes a loaded model may be unused before it gets unloaded.
Note: Models may get unloaded earlier than that.
type: integer
minimum: 0
max_model_size:
description: Maximum number of bytes allowed for the model's Grasshopper file size.
type: integer
minimum: 0
max_output_size:
description: >-
Maximum number of bytes allowed for an output of a model for a specific set of
parameter values.
type: integer
minimum: 0
max_texture_size:
description: >-
Allows to configure the maximum number of bytes allowed for a single texture.
type: integer
minimum: 0
max_wait_time:
description: >-
Maximum time a computation request may stay waiting before a further worker goes ahead
regardless of whether it already has the model loaded, and regardless of
`num_loaded_max`. This allows to configure a soft or a hard upper boundary for the
number of loaded models.
type: integer
minimum: 0
name:
description: Name of the model.
type: string
num_loaded_max:
description: >-
Maximum number of workers that should have the model loaded at the same time.
type: integer
minimum: 0
num_loaded_min:
description: >-
Minimum number of workers which should have the model loaded once a session to the
model gets opened.
type: integer
minimum: 0
num_preloaded_min:
description: >-
Minimum number of workers that should always have the model loaded, regardless of
session activity. This allows to minimise the likelihood of computation requests being
slower due to model loading.
type: integer
minimum: 0
org_id:
description: Optional organization ID.
type: string
prev_id:
description: >-
The Model ID of the previous version of this model.
This property is applicable only when creating a new model and cannot be used in
conjunction with `prev_id`.
type: string
with_repo:
description: >-
If set to `true`, a new repository will be created for the model.
This property is applicable only when creating a new model and cannot be used in
conjunction with `prev_id`.
type: boolean
pub:
description: Allows public access (ignore `accessdomains`).
type: boolean
require_iframe:
description: Enforces iframe embedding instead of direct embedding.
type: boolean
require_token:
description: Enforces token-based authentication for this model.
type: boolean
session_rate_limit:
description: >-
Limits the number of sessions that can be created by a specific IP address in one hour.
type: integer
minimum: 0
trust:
description: >-
Can this model be trusted (controls whether failed computations will be retried).
allOf:
- $ref: "#/components/schemas/ReqTrustLevel"
use_cdn:
description: Allows the usage of the CDN for fast content distribution.
type: boolean
user_id:
description: Optional user ID.
type: string
webhook_url:
description: >-
The webhook-url for updating the platform backend about model status changes.
type: string
webhook_token:
description: The webhook-token for authentication used by the webhook-url.
type: string
deny_scripts:
description: Allows to control whether the model's Grasshopper file can contain scripts.
type: boolean
ReqParameterDefinitions:
description: >-
Definition of model parameters. A directory of parameter-IDs and parameter-definitions.
type: object
additionalProperties:
$ref: "#/components/schemas/ReqParameterDefinition"
ReqParameterDefinition:
description: Data for a single parameter definition.
type: object
properties:
displayname:
description: Parameter name to display instead of `name`.
type: string
group:
title: ReqParameterDefinitionGroup
description: >-
Set to `null` or `NullObj` to remove the export from the currently assigned group.
oneOf:
- $ref: "#/components/schemas/ReqGroup"
- $ref: "#/components/schemas/NullObj"
hidden:
description: Controls whether the parameter should be hidden in the UI.
type: boolean
order:
description: Ordering of the parameter in client applications.
type: integer
tooltip:
description: Description that is shown as a tooltip in the clients.
type: string
settings:
description: Holds parameter-type specific information.
type: object
ReqFileUpload:
description: >-
Body of a file upload request. A directory of file-parameter-IDs and upload-definitions.
type: object
additionalProperties:
$ref: "#/components/schemas/ReqFileDefinition"
example:
"e6a576af-2e16-43cc-a78f-d74ae1154205":
format: "image/jpeg"
size: 1234
ReqFileDefinition:
description: Data for a single file parameter.
type: object
properties: