Create, Update or Delete ResourceSet

Prev Next

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:

Name Type Description Notes
owner string Owner of the resource set Relates 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:

Name Type Description Notes
Id integer Resource Set ID
Action string Action to be performed on the Resource Set Valid actions are: "C" - create, "U" - update, "D" delete
RowId integer Identify row in this request that lines up with the Response Fields
UpdateIfExists boolean In case of create action and resource set exists and this is set to true,
the create action will be converted to an update action.
Name string Resource Set Name
Owner string Owner of the Resource Set Owner 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:

Name Type Description Notes
Id integer Resource Set ID
RowId integer Lines up with the RowID in the Request Fields
Message string Message from API related to the action for row
Result string Indicate the success or failure of the action S = 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."
    }
]