Create, Update or Delete ResourceSet
  • 18 Jul 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Create, Update or Delete ResourceSet

  • Dark
    Light
  • PDF

Article summary

Create, Update or Delete ResourceSet

/v1/resourceset

Create new Resource Set, update or delete existing Resource Set.

Safran Project ILAP Gateway

This API is only available in the Safran Project ILAP Gateway product.

Exaplme for calling:

http://server/v1/resourceset
http://server/v1/resourceset?owner=safransa

Allowed Methods:

[POST]
API Controller: ResourceSet

Description:

Create, update or delete resource set.

Parameters:

NameTypeDescriptionNotes
ownerstringOwner of the resource setRelates to "SafranWebApiOwnerVerificationDuringApiCalls" in "Application Settings"


Request Fields:


Syntax of the fields are similar to what is found when using GET /v1/resourceset with additional elements, see ResourceSet.

ResourceSet:

NameTypeDescriptionNotes
IdintegerResource Set ID
ActionstringAction to be performed on the Resource SetValid actions are: "C" - create, "U" - update, "D" delete
RowIdintegerIdentify row in this request that lines up with the Response Fields
UpdateIfExistsbooleanIn case of create action and resource set exists and this is set to true,
the create action will be converted to an update action.
NamestringResource Set Name
OwnerstringOwner of the Resource SetOwner is a user name.
  • For update and delete actions where Id is missing, API will identify the Resource Set using the Name and Owner.
  • Delete of Resource Set which has dependencies is not permitted and will result in failure.
  • Combination of Owner and Name must be unique when creating a new Resource Set.

Response Fields:

NameTypeDescriptionNotes
IdintegerResource Set ID
RowIdintegerLines up with the RowID in the Request Fields
MessagestringMessage from API related to the action for row
ResultstringIndicate the success or failure of the actionS = success, F = failure


Call Sample
[
   {
      "RowID":1,
      "Action":"C",
      "UpdateIfExists":false,
      "Id":null,
      "Name":"Resource Set 1",
      "Owner":"SAFRANSA"
   },
   {
      "RowID":2,
      "Action":"U",
      "Id":9,
      "Name":"Resource Set 3",
      "Owner":"SAFRANSA"
   },
   {
      "RowID":3,
      "Action":"D",
      "UpdateIfExists":true,
      "Id":8,
      "Name":"Resource Set 1",
      "Owner":"ME"
   }
]

Response Sample
[
    {
        "Id": 0,
        "RowId": 1,
        "Result": "F",
        "Message": "Resource Set already exists."
    },
    {
        "Id": 9,
        "Name": "Resource Set 3",
        "Owner": "SAFRANSA",
        "RowId": 2,
        "Result": "S"
    },
    {
        "Id": 0,
        "RowId": 3,
        "Result": "F",
        "Message": "Resource Set does not exists."
    }
]


Was this article helpful?

What's Next