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

« Previous Version 3 Next »

MethodGET
URL/rest/jip-api/1.0/linked-assets/asset-id/[assetId].json
Sample Response
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : [ {
    "id" : 1,
    "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" : 13,
      "name" : "Chair",
      "sortOrder" : 0,
      "formId" : 6,
      "created" : 1587728828429,
      "creator" : "admin",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.quantity",
        "value" : ""
      }, {
        "fieldName" : "asset.reservedFor",
        "value" : ""
      }, {
        "fieldName" : "asset.substatus",
        "value" : ""
      }, {
        "fieldName" : "asset.costCurrency",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.assetTag",
        "value" : "Sandalye"
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10100"
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.status",
        "value" : "2"
      } ]
    },
    "assetLinkType" : {
      "id" : 4,
      "assetLinkName" : "Own",
      "outwardDescription" : "owns",
      "inwardDescription" : "owned by"
    }
  }, {
    "id" : 2,
    "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" : 19,
      "name" : "Desk",
      "sortOrder" : 0,
      "formId" : 5,
      "created" : 1587728868740,
      "creator" : "admin",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.quantity",
        "value" : "88"
      }, {
        "fieldName" : "asset.substatus",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10100",
        "bulkUpdateTargetValue" : {
          "attributeId" : 6,
          "attributeName" : "Owner"
        }
      }, {
        "fieldName" : "asset.status",
        "value" : "2"
      } ]
    },
    "assetLinkType" : {
      "id" : 4,
      "assetLinkName" : "Own",
      "outwardDescription" : "owns",
      "inwardDescription" : "owned by"
    }
  }, {
    "id" : 4,
    "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" : 22,
      "name" : "Monitor",
      "sortOrder" : 0,
      "formId" : 4,
      "created" : 1587728886498,
      "creator" : "admin",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.substatus",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10100",
        "bulkUpdateTargetValue" : {
          "attributeId" : 6,
          "attributeName" : "Owner"
        }
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.status",
        "value" : "2"
      } ]
    },
    "assetLinkType" : {
      "id" : 4,
      "assetLinkName" : "Own",
      "outwardDescription" : "owns",
      "inwardDescription" : "owned by"
    }
  }, {
    "id" : 5,
    "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" : 25,
      "name" : "Mouse",
      "sortOrder" : 0,
      "formId" : 2,
      "created" : 1587728897344,
      "creator" : "admin",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.substatus",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10100",
        "bulkUpdateTargetValue" : {
          "attributeId" : 6,
          "attributeName" : "Owner"
        }
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.status",
        "value" : "2"
      } ]
    },
    "assetLinkType" : {
      "id" : 4,
      "assetLinkName" : "Own",
      "outwardDescription" : "owns",
      "inwardDescription" : "owned by"
    }
  }, {
    "id" : 28,
    "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" : 16,
      "name" : "Macbook Pro",
      "sortOrder" : 0,
      "formId" : 1,
      "created" : 1587728848813,
      "creator" : "admin",
      "inventoryItems" : [ ],
      "systemFields" : [ {
        "fieldName" : "asset.quantity",
        "value" : ""
      }, {
        "fieldName" : "asset.substatus",
        "value" : "1"
      }, {
        "fieldName" : "asset.reservedFor",
        "value" : ""
      }, {
        "fieldName" : "asset.assignee",
        "value" : ""
      }, {
        "fieldName" : "asset.owner",
        "value" : "JIRAUSER10100",
        "bulkUpdateTargetValue" : {
          "attributeId" : 6,
          "attributeName" : "Owner"
        }
      }, {
        "fieldName" : "asset.belongsToGroup",
        "value" : ""
      }, {
        "fieldName" : "asset.status",
        "value" : "1"
      } ]
    },
    "assetLinkType" : {
      "id" : 4,
      "assetLinkName" : "Own",
      "outwardDescription" : "owns",
      "inwardDescription" : "owned by"
    }
  } ],
  "pagingInfo" : null
}

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