Navigation:  Integration via REST web services > Published web services > Asset >

ASTASTINSERT

Previous  Top  Next

This method makes it possible to add/edit an asset through a REST web service.

 

Method

POST

 

Input parameters

ID #

Constant value

Parameter

Type

Description

cdprod

109

QUERY

NUMERIC

Product code

classname

asset_insert_interface

QUERY

STRING

Class name used in WADL

classpath

ast_import

QUERY

STRING

Path to the class used in WADL

 

Request body

{

     "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"

}

 

Output parameter

{

   "success": true,

   "total": 1,

   "results": [

       {

           "Result": true,

           "Code": 1

       }

   ]

 

To enter each of these request items it is necessary to follow the pattern documented below.

Request

ID #

Required

Description

idobject

X

Asset ID #

nmobject

X

Asset name.

idobjecttype

X

Asset type ID #.

idteam

X

Responsible team ID #.

fgapplication

X

Relationship name

dtstartoper

X

Reverse relationship:

1 – Yes;

2 – No.

quantity

X

Asset quantity

cavity

 

Cavity (required for "Tooling").

manufacturer

 

Manufacturer (company name)

idserialnumber

 

Serial number

idmodel

 

Template

idcalendar

X

Calendar ID #

supplier

 

Supplier (company name)

vlequipmentcost

 

Equipment cost

vlcost

 

Hourly cost

dtrevision

 

Revision date. It must be entered in the YYYY-MM-DD format.

iduser

X1

User's reg. code #.

attributes

 

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

 

Description

characteristics

 

Characteristics

dsobservation

 

Comments

 

X1 - Required only when the asset type used contains revision.