Create Resources
  • 18 Jul 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Create Resources

  • Dark
    Light
  • PDF

Article summary

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:

NameTypeDescription
RowIdintegeridentifying a row in this request that lines up with the response
nameVarchar(100)Resource code/name
descriptionVarchar(100)Resource description [Optional]
resource_set_idintegerRelation to Resource set (this is not network id, but resource set id)
resource_typetinyintResource type (1=qty,2=cost) [SAP -> 1]
cost_ratefloatUnit cost rate for resource type=1 [Optional]
parentintegerused for hierarchical structure [Optional]


Response Fields:


Table with response for each row in the request:

NameTypeDescriptionNotes
RowIdintegercorresponds to the RowID in the request
ResultbyteS(uccess) or F(ail) indicating if the requested action was successfully executed
MessagestringEmpty if success; error message if the requested action failed.
MessageIdintegerMessageId: Identifies error message
seqintegerSafran Resource ID
namestringSafran 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
  }
]



Was this article helpful?

What's Next