Process Step Templates are utilizes to store default values and calculation information for a new process step that is created within a new process chain.
Request Process Step Template by ID (GET)
Get process step template information.
Return Data
Parameter | Description | Type | Unit | Example |
uid | Unique ID | string | – | “53474aef15cb4ba2a23a798fa8eabe74” |
name | Display name | string | – | “Plasma Hardening” |
owner_username | Username of creator | string | – | “arnd” |
restriction | Access restriction level | string | – | “owner” |
tech | Technology | string, null | – | “additive_manufacturing” |
prc_acronym | Acronym of associated process | string, null | – | “slm” |
step_type | Process step type | string | – | “post” |
obligatory | Must be included when generating a new process chain | bool | – | “part” |
calc_lvl | Calculation level (once per part, per job or per lot). | string | – | – |
setup_time | Time to setup the process | float | h | 1.0 |
process_time | Process time | float | h | 3.2 |
unloading_time | Time to reset the process step to initial conditions. | float | h | 0.5 |
machine_hourly_rate | Machine hourly rate. | float | €/h | 15.35 |
worker_type | Personell type executing the process step | string | – | “designer” |
staff_time_factor, staff_time_factor_percent | Percentage of the build time the machine has to be supervised by personell. | float | – | 0.1 10 |
Usage
# GET "https://platform.3dspark.de/api/v1/process-step-template/<uid>/""
this.axiosInstance
.get("/api/v1/process-step-template/53474aef15cb4ba2a23a798fa8eabe74/")
.then((response) => {
console.log(response.data);
})
Create Process Step Template (POST)
Get process step template information.
Return Data
Parameter | Description | Required | Type | Unit | Valid Values | Default |
name | Name | true | string | – | 1 – 250 characters | – |
restriction | Access restriction level | false | string, null | – | null, “owner”, “organization” | “owner” |
tech | Technology | false | string, null | – | null, “additive_manufacturing”, “milling”, “casting”, “injection_molding”, “sheet_metal_work” | “additive_manufacturing” |
prc_acronym | Acronym of associated process | false | string, null | – | null, ‘fdm’, ‘sla’, ‘dlp’, ‘dls’, ‘sls’, ‘mjf’, ‘pjm’, ‘dod’, ‘bj’, ‘slm’, ‘ebm’, ‘lmm’, ‘waam’ | null |
step_type | Process step type | true | string | – | “pre”, “post” | – |
obligatory | Must be included when generating a new process chain | true | bool | – | true, false | – |
calc_lvl | Calculation level (once per part, per job or per lot). | true | string | – | “part”, “job”, “lot” | – |
setup_time | Time to setup the process | false | float | h | 0 – 100000 | 0 |
process_time | Process time | false | float | h | 0 – 100000 | 0 |
unloading_time | Time to reset the process step to initial conditions. | false | float | h | 0 – 100000 | 0 |
machine_hourly_rate | Machine hourly rate. | true | float | €/h | 0.1 – 100000 | – |
worker_type | Personell type executing the process step | true | string | – | “am_expert”, “designer”, “technician” | – |
staff_time_factor, staff_time_factor_percent | Percentage of the build time the machine has to be supervised by personell. | true | float | – | 0 – 1.0 0 – 100 | – |
Errors
Precondition | Status code | Error message |
mac_id is a valid uuid | 422 | Invalid user input. |
User has read access rights to the machine | 403 | Access forbidden. |
Machine with mac_id can be found in database | 404 | Object not found in database. |
Usage
# POST "https://platform.3dspark.de/api/v1/process-step-template/"
let formData = {
"name": "Plasma Hardening",
// "tech": "additive_manufacturing",
"prc_acronym": "slm",
"step_type": "post",
"obligatory": false,
// "restriction": "owner",
"calc_lvl": "part",
// "setup_time": 1000,
// "process_time": 1000,
// "unloading_time": 1000,
"machine_hourly_rate": 0,
"worker_type": "technician",
// "staff_time_factor": 1,
}
this.axiosInstance
.post("/api/v1/process-step-template/", formData)
.then((response) => {
console.log(response.data);
})
Return Data
See ‘Request Process Step Template by ID (GET)’
Errors
Precondition | Status code | Error message |
Form data are valid | 422 | Invalid user input. |
Edit Process Step Template by ID (PUT)
Edit an existing process step template.
Form Data
At least one valid parameter. See ‘Create Process Step Template (POST)’
Return Data
See ‘Request Machine by ID (GET)’
Errors
Precondition | Status code | Error message |
Formdata valid | 422 | Invalid user input. |
A mat_id is passed. | 400 | No machine id given. |
User is manager of owner’s organization or owner itself. | 403 | Access forbidden. |
Usage
// PUT "https://platform.3dspark.de/api/v1/process-step-template/<uid>/"
let formData = {
"name": "Plasma Hardening",
// "tech": "additive_manufacturing",
// "prc_acronym": "slm",
// "step_type": "post",
// "obligatory": false,
// "restriction": "owner",
// "calc_lvl": "part",
// "machine_hourly_rate": 0,
// "worker_type": "technician",
// "setup_time": 1000,
// "process_time": 1000,
// "unloading_time": 1000,
// "staff_time_factor": 1,
}
this.axiosInstance
.put("/api/v1/process-step-template/53474aef15cb4ba2a23a798fa8eabe74/", formData)
.then((response) => {
console.log(response.data);
})
Delete Process Step Template (DELETE)
Delete process step template.
Return Data
Success notification.
Errors
Precondition | Status code | Error message |
A uid is passed. | 400 | No ProcessStepTemplate uid given. |
User is manager of owner’s organization or owner itself of the machine | 403 | Access forbidden. |
Usage
// DELETE "https://platform.3dspark.de/api/v1/process-step-template/<uid>/"
this.axiosInstance
.delete("/api/v1/process-step-template/53474aef15cb4ba2a23a798fa8eabe74/")
.then((response) => {
console.log(response.data);
})
Get Paginated List of all Process Step Templates (GET)
Get all accessibly process steps for a user as pagined result.
Return Data
{
"links": {
"next": "http://django:8000/api/v1/process-step-template-list/?page=3",
"previous": "http://django:8000/api/v1/process-step-template-list/"
},
"count": 79,
"num_pages": 4,
"results": [
{
"uid": "a598993958114e1fa7779bd277c799fb",
"name": "Data Preparation",
"owner_username": null,
"restriction": null,
"tech": "additive_manufacturing",
"prc_acronym": "dls",
"step_type": "pre",
"obligatory": true,
"calc_lvl": "lot",
"setup_time": 0.1,
"process_time": 0.1,
"unloading_time": 0.05,
"machine_hourly_rate": 0.3,
"worker_type": "technician",
"staff_time_factor": 1,
"order": 60
},
...
]
}
Usage
// GET "https://platform.3dspark.de/api/v1/process-step-template-list/?page=<page_number>"
// Page number defaults to 1, if not given
async button1Method(){
this.axiosInstance
.get("/api/v1/process-step-template-list/?page=2")
.then((response) => {
console.log(response.data);
});
},
Get List of all Process Step Templates (GET)
Get all accessibly process steps for a user.
Return Data
[
{
"uid": "bf830014ff6c46a0a9de38e9a61f0f66",
"name": "Administration Fee",
"owner_username": null,
"restriction": null,
"tech": null,
"prc_acronym": null,
"step_type": "post",
"obligatory": false,
"calc_lvl": "lot",
"setup_time": 0,
"process_time": 1,
"unloading_time": 0,
"machine_hourly_rate": 0,
"worker_type": "technician",
"staff_time_factor": 1,
"order": 2600
},
...
]
Usage
// GET "https://platform.3dspark.de/api/v1/process-step-template-all/"
async button1Method(){
this.axiosInstance
.get("/api/v1/process-step-template-all/")
.then((response) => {
console.log(response.data);
});
},