Skip to main content
Version: 2.2.3

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 parametersTypeRequiredDescription
cdprodNumericYesProduct code
Constant value: 109
classnameStringYesClass name used in WADL
Constant value: asset_insert_interface
classpathStringYesPath to the class used in WADL
Constant value: ast_import

Example request:

Supported attributes:

Request body parameterTypeRequiredDescription
idobjectStringYesAsset ID #
nmobjectStringYesAsset name
idobjecttypeStringYesAsset type ID #
idteamStringYesResponsible team ID #
fgapplicationStringYesRelationship name
dtstartoperStringYesReverse relationship:
1 - Yes;
2 - No.
quantityStringYesAsset quantity
cavityStringCavity (required when is “Tooling”)
manufacturerStringManufacturer (company name)
idserialnumberStringSerial number
idmodelStringTemplate
idcalendarStringYesCalendar ID #
supplierStringSupplier (company name)
vlequipmentcostStringEquipment cost
vlcostStringHourly cost
dtrevisionStringRevision date. It must be entered in the YYYY-MM-DD format.
iduserStringYes¹User ID.
attributesStringAsset 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.
dsdescriptionStringDescription
characteristicsStringCharacteristics
dsobservationStringComments
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
}
]
}