Skip to end of banner
Go to start of banner

Asset Link REST Services

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Create link between multiple assets

MethodPOST
URL/rest/jip-api/1.0/linked-assets/multiple/asset-id/[assetId].json
Request Body
  {
    "from": {
      "id": 3
    },
    "to": {
      "id": 9
    },
    "assetLinkType": {
      "id": "3"
    }
  },
  {
    "from": {
      "id": 3
    },
    "to": {
      "id": 23
    },
    "assetLinkType": {
      "id": "3"
    }
  }
Sample Response
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : null,
  "pagingInfo" : null
}
Failure Message
{
  "success": false,
  "errorCode": "EntityExistsException",
  "errorMessage": "linkedAsset",
  "data": null,
  "pagingInfo": null
}

Create link between two asset


MethodPOST
URL/rest/jip-api/1.0/linked-assets/asset-id/[assetId].json
Request Body
{
  "from": {
    "id": 3
  },
  "to": {
    "id": 7
  },
  "assetLinkType": {
    "id": "3"
  }
}
Sample Response
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : {
    "id" : 32,
    "from" : {
      "id" : 3,
      "name" : "Armağan Çağlar",
      "sortOrder" : 0,
      "formId" : 7,
      "created" : 1587728466646,
      "creator" : "admin",
      "attachments" : "[ ]",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.managedBy",
        "value" : "JIRAUSER10101"
      }, {
        "fieldName" : "asset.substatus",
        "value" : ""
      }, {
        "fieldName" : "asset.reservedFor",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10100",
        "bulkUpdateTargetValue" : {
          "attributeId" : 6,
          "attributeName" : "Owner"
        }
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.location",
        "value" : "2"
      }, {
        "fieldName" : "asset.status",
        "value" : "2"
      } ]
    },
    "to" : {
      "id" : 24,
      "name" : "Mouse",
      "sortOrder" : 0,
      "formId" : 2,
      "created" : 1587728894767,
      "creator" : "admin",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.substatus",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10103",
        "bulkUpdateTargetValue" : {
          "attributeId" : 6,
          "attributeName" : "Owner"
        }
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.status",
        "value" : "2"
      } ]
    },
    "assetLinkType" : {
      "id" : 3,
      "assetLinkName" : "Connects",
      "outwardDescription" : "connects",
      "inwardDescription" : "connected by"
    }
  },
  "pagingInfo" : null
}
Failure Message
{
  "success": false,
  "errorCode": "EntityExistsException",
  "errorMessage": "linkedAsset",
  "data": null,
  "pagingInfo": null
}


Remove link between assets

MethodDELETE
URL/rest/jip-api/1.0/linked-assets/assetId/[assetId]/linkedAssetId/[linkedAssetId].json
Sample Response
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : true,
  "pagingInfo" : null
}
Failure Message
{
  "success": false,
  "errorCode": "EntityExistsException",
  "errorMessage": "linkedAsset",
  "data": null,
  "pagingInfo": null
}
  • No labels