GetProject
- Less than a minute to read
The ~/api/Origami/GetProject endpoint retrieves a saved JSON file from your server. It may be used to recreate the saved project in the editor.
Request type
[GET
]
URL
~/api/Origami/GetProject?id=<projectFileName>
Required URL Param
id
=[string] - a name of a file containing the editor's data.
Example call
$.ajax({
type: "GET",
url: appUrl + "api/Origami/GetProject",
dataType: 'json',
data: {
id: "ftpdkb25.4uo"
},
contentType: "application/json; charset=utf-8",
success: function (data, textStatus, jqXHR) {
console.log("Project: " + data);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Error occured during loading the project.");
}
});
Success response
Status Code: 200 OK
Content:
{
"DieCutModelId":"ECMA_A20.21.03.01",
"DieCutModelParams":{
"L":50,
"W":30,
"H":60
},
"DieCutTemplate":[
{
"Name":"",
"Mockup":"origami/a4ufmjb3.skt",
"Template":"5b1flwr1.akk",
"Model3D":"tvrwzxn0.vfq",
"Width":2155,
"Height":2309,
"Dpi":300,
"Animation":null,
"Position":null
}
],
"StateId":"67129ad4-af22-494e-aafc-22b1f64f3bdf"
}