Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
MethodGET
URL/rest/jip-api/1.0/linked-assets/asset-id/[assetId].json


Code Block
titleSample Response
collapsetrue
{
  "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


Code Block
titleRequest Body
collapsetrue
  {
    "from": {
      "id": 3
    },
    "to": {
      "id": 9
    },
    "assetLinkType": {
      "id": "3"
    }
  },
  {
    "from": {
      "id": 3
    },
    "to": {
      "id": 23
    },
    "assetLinkType": {
      "id": "3"
    }
  }


Code Block
titleSample Response
collapsetrue
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : null,
  "pagingInfo" : null
}


Code Block
titleFailure Message
collapsetrue
{
  "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


Code Block
titleRequest Body
collapsetrue
{
  "from": {
    "id": 3
  },
  "to": {
    "id": 7
  },
  "assetLinkType": {
    "id": "3"
  }
}


Code Block
titleSample Response
collapsetrue
{
  "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
}


Code Block
titleFailure Message
collapsetrue
{
  "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


Code Block
titleSample Response
collapsetrue
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : true,
  "pagingInfo" : null
}


Code Block
titleFailure Message
collapsetrue
{
  "success": false,
  "errorCode": "EntityExistsException",
  "errorMessage": "linkedAsset",
  "data": null,
  "pagingInfo": null
}