Page tree
Skip to end of metadata
Go to start of metadata
MethodGET
URL/rest/jip-api/1.0/linked-assets/[linkedAssetId].json
Sample Response
{
  "success": true,
  "errorCode": null,
  "errorMessage": null,
  "data": {
    "id": 32,
    "from": {
      "id": 3187,
      "name": "Computer",
      "sortOrder": 0,
      "formId": 491,
      "created": 1587726939487,
      "creator": "admin",
      "inventoryItems": [],
      "systemFields": [
        {
          "fieldName": "asset.quantity",
          "value": "1"
        },
        {
          "fieldName": "asset.managedBy",
          "value": "jevans-sd-demo"
        },
        {
          "fieldName": "asset.substatus",
          "value": ""
        },
        {
          "fieldName": "asset.reservedFor",
          "value": ""
        },
        {
          "fieldName": "asset.costCurrency",
          "value": "USD"
        },
        {
          "fieldName": "asset.assignee",
          "value": "JIRAUSER18100"
        },
        {
          "fieldName": "asset.owner",
          "value": ""
        },
        {
          "fieldName": "asset.belongsToGroup",
          "value": "[ \"jira-developers\" ]"
        },
        {
          "fieldName": "asset.location",
          "value": ""
        },
        {
          "fieldName": "asset.cost",
          "value": "1000"
        },
        {
          "fieldName": "asset.serialNumber",
          "value": ""
        },
        {
          "fieldName": "asset.status",
          "value": "2"
        },
        {
          "fieldName": "asset.invoiceNumber",
          "value": ""
        }
      ]
    },
    "to": {
      "id": 3277,
      "name": "Monitor",
      "sortOrder": 0,
      "formId": 502,
      "created": 1587726947836,
      "creator": "admin",
      "inventoryItems": [],
      "systemFields": [
        {
          "fieldName": "asset.quantity",
          "value": "1"
        },
        {
          "fieldName": "asset.reservedFor"
        },
        {
          "fieldName": "asset.substatus",
          "value": "1"
        },
        {
          "fieldName": "asset.costCurrency",
          "value": "USD"
        },
        {
          "fieldName": "asset.assignee",
          "value": "JIRAUSER18000"
        },
        {
          "fieldName": "asset.cost",
          "value": "2000"
        },
        {
          "fieldName": "asset.status",
          "value": "1"
        }
      ]
    },
    "assetLinkType": {
      "id": 3,
      "assetLinkName": "Connects",
      "outwardDescription": "connects",
      "inwardDescription": "connected by"
    }
  },
  "pagingInfo": null
}

Listing asset links by Asset ID

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.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.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/[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