Appearance
API TUTORIAL – DESIGNS RETRIEVAL
Intro
This document shows how to fetch design information and documentation (including IFCs, DWGs, ...).
INFO
The base URL for the produuz.it API V2 is: https://back.produuz.it/api/v2/
Design retrieval
A design can be retrieved directly from the assembly or module design endpoint, building the URL with the UUID of the design.
Endpoint: https://back.produuz.it/api/v2/constructibles/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/
- Method: GET.
- Request Body: Empty.
- Response: Serialized design.
Example Response Payload
json
{
"project": "16dbfae0-3694-40c8-a86a-d5e438884cae",
"parent_designs": [],
"uuid": "52f251f2-dad6-4fdc-837c-f278d29cb1b7",
"created": "2023-12-22T09:13:44.271301Z",
"modified": "2024-03-20T16:59:28.772614Z",
"name": "H108",
"revision": 3,
"resources": {},
"meta": {
"r": [
[-0.9999999999999998, 0.0, 0.0],
[0.0, 0.0, 0.9999999999999998],
[0.0, 0.9999999999999998, 0.0]
],
"t": [32276.167999999994, 0.0, 9635.709999999997],
"has_ifc": true,
"metrics": {
"x": 3774.0,
"y": 2657.0,
"z": 93.0,
"neto": 10.027518,
"bruto": 10.027518
},
"analysis": "done",
"dwg_count": 0,
"bruto_area": 0,
"actual_count": 11,
"subassemblies": [],
"analysis_nonce": "7019aff5-7f98-4d51-9b67-4265de375250",
"analyzed_ifc_hash": "e63129fbafdf1a5fc857ac435c3b5dc0230092fdbb4ea1455357071610dd8e5d",
"ifc_assembly_meta": {},
"ifc_assembly_name": "unknown"
},
"tipo": ""
}{
"project": "16dbfae0-3694-40c8-a86a-d5e438884cae",
"parent_designs": [],
"uuid": "52f251f2-dad6-4fdc-837c-f278d29cb1b7",
"created": "2023-12-22T09:13:44.271301Z",
"modified": "2024-03-20T16:59:28.772614Z",
"name": "H108",
"revision": 3,
"resources": {},
"meta": {
"r": [
[-0.9999999999999998, 0.0, 0.0],
[0.0, 0.0, 0.9999999999999998],
[0.0, 0.9999999999999998, 0.0]
],
"t": [32276.167999999994, 0.0, 9635.709999999997],
"has_ifc": true,
"metrics": {
"x": 3774.0,
"y": 2657.0,
"z": 93.0,
"neto": 10.027518,
"bruto": 10.027518
},
"analysis": "done",
"dwg_count": 0,
"bruto_area": 0,
"actual_count": 11,
"subassemblies": [],
"analysis_nonce": "7019aff5-7f98-4d51-9b67-4265de375250",
"analyzed_ifc_hash": "e63129fbafdf1a5fc857ac435c3b5dc0230092fdbb4ea1455357071610dd8e5d",
"ifc_assembly_meta": {},
"ifc_assembly_name": "unknown"
},
"tipo": ""
}Design filtering
The following query parameters filter the list of designs:
| Query param | Description | Example |
|---|---|---|
| name | Name of the assembly design | FD-500 |
| revision | Revision number of the design | 5 |
| project | Project uuid (also stdlib) | b68be32e-262a-4f12-9b79-4b4bc8918d9b |
| scheduled_prod_date | Scheduled production date exists in its linked actual assemblies | 2024-07-12 |
| client_order_id | Client order id exists in its linked actual assemblies | whatever_client_string |
- Method: GET.
- Request Body: Empty.
- URL example: https://back.produuz.it/api/v2/constructibles/assembly_designs/?name=FD-500&scheduled_prod_date=2024-07-12
This returns the standard paginated response:
json
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"project": "b68be32e-262a-4f12-9b79-4b4bc8918d9b",
"parent_designs": [],
"uuid": "9cac093d-08a8-45c9-8959-ad4bbda115d1",
"created": "2023-11-02T14:59:10.967320Z",
"modified": "2024-01-21T16:30:52.034689Z",
"name": "FD-500",
"revision": 0,
"resources": {},
"meta": {
"r": [
[
1.0,
0.0,
0.0
],
[
0.0,
1.0,
0.0
],
[
0.0,
0.0,
1.0
]
],
"t": [
0,
0,
0
],
"has_ifc": true,
"metrics": {
"x": 1262.5,
"y": 125.0,
"z": 2701.0,
"neto": 0.091875,
"bruto": 0.152075
},
"analysis": "done",
"dwg_count": 0,
"bruto_area": 0,
"actual_count": 1,
"subassemblies": [],
"analysis_nonce": "32f947ff-59a5-4bb2-971c-db8f884aa46c",
"analyzed_ifc_hash": "e8c853b176f3428b2bacd0c32a5aee048c44ecc87d4f8e4796d510dfc947a13d",
"ifc_assembly_meta": {
"name": "KERTO",
"ifc_id": "2HJkr6F9T7x8WLpmQ5UHdm",
"ifc_tag": "FD-500"
},
"ifc_assembly_name": "unknown",
"zone_branches_map": {
"0": [
"unknown"
],
"1": [
"plate"
],
"-1": [
"plate"
],
"11": [
"plate"
],
"-10": [
"unknown"
]
}
},
"tipo": ""
}
]
}
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"project": "b68be32e-262a-4f12-9b79-4b4bc8918d9b",
"parent_designs": [],
"uuid": "9cac093d-08a8-45c9-8959-ad4bbda115d1",
"created": "2023-11-02T14:59:10.967320Z",
"modified": "2024-01-21T16:30:52.034689Z",
"name": "FD-500",
"revision": 0,
"resources": {},
"meta": {
"r": [
[
1.0,
0.0,
0.0
],
[
0.0,
1.0,
0.0
],
[
0.0,
0.0,
1.0
]
],
"t": [
0,
0,
0
],
"has_ifc": true,
"metrics": {
"x": 1262.5,
"y": 125.0,
"z": 2701.0,
"neto": 0.091875,
"bruto": 0.152075
},
"analysis": "done",
"dwg_count": 0,
"bruto_area": 0,
"actual_count": 1,
"subassemblies": [],
"analysis_nonce": "32f947ff-59a5-4bb2-971c-db8f884aa46c",
"analyzed_ifc_hash": "e8c853b176f3428b2bacd0c32a5aee048c44ecc87d4f8e4796d510dfc947a13d",
"ifc_assembly_meta": {
"name": "KERTO",
"ifc_id": "2HJkr6F9T7x8WLpmQ5UHdm",
"ifc_tag": "FD-500"
},
"ifc_assembly_name": "unknown",
"zone_branches_map": {
"0": [
"unknown"
],
"1": [
"plate"
],
"-1": [
"plate"
],
"11": [
"plate"
],
"-10": [
"unknown"
]
}
},
"tipo": ""
}
]
}Resources packages
The serialized design carries its main information. Its files are served through the cloudstorage/packages endpoint, where a query parameter selects the packages linked to a design:
- Method: GET.
- Request Body: Empty.
- Response: List response including all the packages in the "results" field.
This endpoint returns every package the design has. Usually there are 2: "resources" and "heavy_meta".
The heavy meta package holds larger data that is kept out of the database for performance reasons, such as metadata for the 3D viewer.
The resources package is usually the one you want: it holds all the documentation uploaded for the design.
Each package has a list of files, and each file carries a fresh presigned URL to download it directly from Google Cloud Storage. The URL expires; fetch the package again to get a new one.
To filter and compare files, use "name", "meta.section" and "meta.version".
json
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"uuid": "730dc15d-f331-412d-a7f3-37a18034f9e4",
"name": "resources",
"meta": {},
"assembly": null,
"assembly_design": "52f251f2-dad6-4fdc-837c-f278d29cb1b7",
"module": null,
"module_design": null,
"proof": null,
"issue": null,
"part": null,
"part_design": null,
"production_line": null,
"project": null,
"files": [
{
"uuid": "79a38d78-fa96-4413-8d42-cbaf6ded9e2d",
"created": "2023-12-22T09:13:02.683107Z",
"name": "H108.ifc",
"short_name": "H108",
"meta": {
"ext": "ifc",
"tipo": null,
"status": ["uploaded", "designs"],
"section": "assembly_ifc",
"version": 1,
"design_name": "H108"
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/resources/1",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/resources/1/H108.ifc?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e63129fbafdf1a5fc857ac435c3b5dc0230092fdbb4ea1455357071610dd8e5d"
}
]
},
{
"uuid": "d4fbc5ea-4e9c-42a3-9057-4a4260d227b4",
"name": "heavy_meta",
"meta": {},
"assembly": null,
"assembly_design": "52f251f2-dad6-4fdc-837c-f278d29cb1b7",
"module": null,
"module_design": null,
"proof": null,
"issue": null,
"part": null,
"part_design": null,
"production_line": null,
"project": null,
"files": [
{
"uuid": "2e77d7e6-5083-4882-baff-34fdb22dc9d8",
"created": "2023-12-22T09:13:48.314408Z",
"name": "viewer_bom",
"short_name": "viewer_bom",
"meta": {
"version": 0
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/0",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/0/viewer_bom?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e072d054c5b6d546cc61ddf436865ab510621a273b1957b63d3081762c518dfe"
},
{
"uuid": "e515422b-88da-4b17-a523-135781c85fb6",
"created": "2023-12-22T09:46:43.958580Z",
"name": "viewer_bom",
"short_name": "viewer_bom",
"meta": {
"version": 1
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/1",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/1/viewer_bom?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e072d054c5b6d546cc61ddf436865ab510621a273b1957b63d3081762c518dfe"
},
{
"uuid": "7ad83c78-9bab-484d-a679-9f1352ab4291",
"created": "2023-12-22T10:20:23.845530Z",
"name": "viewer_bom",
"short_name": "viewer_bom",
"meta": {
"version": 2
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/2",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/2/viewer_bom?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e072d054c5b6d546cc61ddf436865ab510621a273b1957b63d3081762c518dfe"
}
]
}
]
}{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"uuid": "730dc15d-f331-412d-a7f3-37a18034f9e4",
"name": "resources",
"meta": {},
"assembly": null,
"assembly_design": "52f251f2-dad6-4fdc-837c-f278d29cb1b7",
"module": null,
"module_design": null,
"proof": null,
"issue": null,
"part": null,
"part_design": null,
"production_line": null,
"project": null,
"files": [
{
"uuid": "79a38d78-fa96-4413-8d42-cbaf6ded9e2d",
"created": "2023-12-22T09:13:02.683107Z",
"name": "H108.ifc",
"short_name": "H108",
"meta": {
"ext": "ifc",
"tipo": null,
"status": ["uploaded", "designs"],
"section": "assembly_ifc",
"version": 1,
"design_name": "H108"
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/resources/1",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/resources/1/H108.ifc?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e63129fbafdf1a5fc857ac435c3b5dc0230092fdbb4ea1455357071610dd8e5d"
}
]
},
{
"uuid": "d4fbc5ea-4e9c-42a3-9057-4a4260d227b4",
"name": "heavy_meta",
"meta": {},
"assembly": null,
"assembly_design": "52f251f2-dad6-4fdc-837c-f278d29cb1b7",
"module": null,
"module_design": null,
"proof": null,
"issue": null,
"part": null,
"part_design": null,
"production_line": null,
"project": null,
"files": [
{
"uuid": "2e77d7e6-5083-4882-baff-34fdb22dc9d8",
"created": "2023-12-22T09:13:48.314408Z",
"name": "viewer_bom",
"short_name": "viewer_bom",
"meta": {
"version": 0
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/0",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/0/viewer_bom?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e072d054c5b6d546cc61ddf436865ab510621a273b1957b63d3081762c518dfe"
},
{
"uuid": "e515422b-88da-4b17-a523-135781c85fb6",
"created": "2023-12-22T09:46:43.958580Z",
"name": "viewer_bom",
"short_name": "viewer_bom",
"meta": {
"version": 1
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/1",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/1/viewer_bom?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e072d054c5b6d546cc61ddf436865ab510621a273b1957b63d3081762c518dfe"
},
{
"uuid": "7ad83c78-9bab-484d-a679-9f1352ab4291",
"created": "2023-12-22T10:20:23.845530Z",
"name": "viewer_bom",
"short_name": "viewer_bom",
"meta": {
"version": 2
},
"cloud_folder": "16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/2",
"presigned_url": "https://storage.googleapis.com/produuzit/16dbfae0-3694-40c8-a86a-d5e438884cae/assembly_designs/52f251f2-dad6-4fdc-837c-f278d29cb1b7/heavy_meta/2/viewer_bom?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=3600&X-Goog-Signature=...",
"hash": "e072d054c5b6d546cc61ddf436865ab510621a273b1957b63d3081762c518dfe"
}
]
}
]
}INFO
You can also filter by package name by adding it to the query parameters, like this: https://back.produuz.it/api/v2/cloudstorage/packages/?assembly_design=52f251f2-dad6-4fdc-837c-f278d29cb1b7&name=resources
INFO
You can also get the design packages from the client_order_id of a constructible, with the query key assembly_design__actuals__client_order_id (module_design__actuals__client_order_id for modules).
INFO
This page uses the assembly_designs endpoint, but the same applies to the module_designs endpoint.