ASTASTINSERT
This method makes it possible to add or edit an asset through a REST web service.
POST /apigateway/se/generic/gn_webservice/gn_webservice_execute.php
Query parameters:
Query parameters | Type | Required | Description |
---|---|---|---|
cdprod | Numeric | Yes | Product codeConstant value: 109 |
classname | String | Yes | Class name used in WADLConstant value: asset_insert_interface |
classpath | String | Yes | Path to the class used in WADLConstant value: ast_import |
Example request:
Supported attributes:
Request body parameter | Type | Required | Description |
---|---|---|---|
idobject | String | Yes | Asset ID # |
nmobject | String | Yes | Asset name |
idobjecttype | String | Yes | Asset type ID # |
idteam | String | Yes | Responsible team ID # |
fgapplication | String | Yes | Relationship name |
dtstartoper | String | Yes | Reverse relationship: 1 - Yes; 2 - No. |
quantity | String | Yes | Asset quantity |
cavity | String | Cavity (required when is “Tooling”) | |
manufacturer | String | Manufacturer (company name) | |
idserialnumber | String | Serial number | |
idmodel | String | Template | |
idcalendar | String | Yes | Calendar ID # |
supplier | String | Supplier (company name) | |
vlequipmentcost | String | Equipment cost | |
vlcost | String | Hourly cost | |
dtrevision | String | Revision date. It must be entered in the YYYY-MM-DD format. | |
iduser | String | Yes¹ | User ID. |
attributes | String | Asset attributes. Example:Attribute_ID_#=value1_of_attribute ,value2_of_attribute ,value3_of_attribute .Note: - For attributes with numeric value, the decimal place separator must be . (point).- For date fields, the value must have the "Y-M-D (Year-Month-Day)" format. | |
dsdescription | String | Description | |
characteristics | String | Characteristics | |
dsobservation | String | Comments |
info
Yes¹ - Required only when the type of asset used contains revision.
{
"idobject": "string",
"nmobject": "string",
"idobjecttype": "string",
"idteam": "string",
"fgapplication": "string",
"dtstartoper": "string",
"quantity": "string",
"cavity": "string",
"manufacturer": "string",
"idserialnumber": "string",
"idmodel": "string",
"idcalendar": "string",
"supplier": "string",
"vlequipmentcost": "string",
"vlcost": "string",
"dtrevision": "string",
"iduser": "string",
"attributes": "string",
"dsdescription": "string",
"characteristics": "string",
"dsobservation": "string"
}
Example response:
200 OK
{
"success": true,
"total": 1,
"results": [
{
"Result": true,
"Code": 1
}
]
}