Create Resources

Prev Next

Create resources

/v1/resources

Maintain Resources

Example for calling:

http://server/v1/resources

See Request Body below.

Allowed Methods:

[POST]
API Controller: Resources

Description:

Resources can only be created .

Request Fields:

Name Type Description
RowId integer identifying a row in this request that lines up with the response
name Varchar(100) Resource code/name
description Varchar(100) Resource description [Optional]
resource_set_id integer Relation to Resource set (this is not network id, but resource set id)
resource_type tinyint Resource type (1=qty, 2=cost)
cost_rate float Unit cost rate for resource type=1 [Optional]
parent integer Used for hierarchical structure [Unusedl]


Response Fields:

Table with response for each row in the request:
Name Type Description Notes
RowId integer corresponds to the RowID in the request
Result byte S(uccess) or F(ail) indicating if the requested action was successfully executed
Message string Empty if success; error message if the requested action failed.
MessageId integer MessageId: Identifies error message
seq integer Safran Resource ID
name string Safran Resource name


Request Body

[
  {
    "RowID": 1,
    "name": "RD-0010",
    "description": "primary resource",
    "resource_set_id": 6,
    "resource_type": 1,
    "cost_rate": 1,
    "parent": null
  },
  {
    "RowID": 2,
    "name": "RD-0011",
    "description": "secondary resource",
    "resource_set_id": 5,
    "resource_type": 1,
    "cost_rate": 1,
    "parent": 3
  }
]