Skip to end of banner
Go to start of banner

Bulk Update 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 4 Next »

Bulk update with filter

MethodPOST
URL/rest/jip-api/1.0/asset-operations/bulk-update.json
Request Body
{
  "operation": 2,
  "sync": false,
  "queryIndexParam": {
    "querySource": "GENERIC_SEARCH",
    "searchType": "basic",
    "listType": "detail",
    "queryIndexSearchParams": [
      {
        "field": "form.name",
        "keywords": [
          "Sample"
        ],
        "fieldType": "LIST"
      }
    ],
    "pageNumber": 1,
    "pageSize": 15,
    "sortDirection": "asc",
    "sortField": "asset.name",
    "sortType": "STRING",
    "respTime": 1589437475637
  },
  "attributes": [
    {
      "attributeId": "19",
      "attributeValue": "text example"
    },
    {
      "attributeId": "24",
      "attributeValue": "127.0.0.2"
    },
    {
      "attributeId": "25",
      "attributeValue": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
    },
    {
      "attributeId": "27",
      "attributeValue": "4"
    },
    {
      "attributeId": "28",
      "attributeValue": "4"
    },
    {
      "attributeId": "29",
      "attributeValue": "2"
    },
    {
      "attributeId": "30",
      "attributeValue": "2020-05-11"
    },
    {
      "attributeId": "31",
      "attributeValue": "2020-05-15T09:29"
    },
    {
      "attributeId": "32",
      "attributeValue": "C"
    },
    {
      "attributeId": "33",
      "attributeValue": "berk"
    },
    {
      "attributeId": "34",
      "attributeValue": "S"
    },
    {
      "attributeId": "35",
      "attributeValue": "S@@@@@@T@@@@@@M"
    },
    {
      "attributeId": "36",
      "attributeValue": 4323
    },
    {
      "attributeId": "37",
      "attributeValue": 34234
    },
    {
      "attributeId": "38",
      "attributeValue": "A"
    },
    {
      "attributeId": "39",
      "attributeValue": "text area example"
    },
    {
      "attributeId": 27,
      "attributeValue": ""
    },
    {
      "attributeId": 28,
      "attributeValue": ""
    },
    {
      "attributeId": 29,
      "attributeValue": ""
    },
    {
      "attributeId": 30,
      "attributeValue": ""
    },
    {
      "attributeId": 31,
      "attributeValue": ""
    },
    {
      "attributeId": 32,
      "attributeValue": ""
    },
    {
      "attributeId": 36,
      "attributeValue": ""
    },
    {
      "attributeId": 24,
      "attributeValue": ""
    },
    {
      "attributeId": 25,
      "attributeValue": ""
    },
    {
      "attributeId": 33,
      "attributeValue": ""
    },
    {
      "attributeId": 34,
      "attributeValue": ""
    },
    {
      "attributeId": 35,
      "attributeValue": ""
    },
    {
      "attributeId": 37,
      "attributeValue": ""
    },
    {
      "attributeId": 38,
      "attributeValue": ""
    },
    {
      "attributeId": 19,
      "attributeValue": ""
    },
    {
      "attributeId": 39,
      "attributeValue": ""
    }
  ],
  "systemFields": [
    {
      "fieldName": "asset.costCurrency",
      "value": "TRY"
    },
    {
      "fieldName": "asset.status",
      "value": "2"
    },
    {
      "fieldName": "asset.substatus",
      "value": null
    },
    {
      "fieldName": "asset.assignee",
      "value": "JIRAUSER10103"
    },
    {
      "fieldName": "asset.owner",
      "value": "JIRAUSER10103"
    },
    {
      "fieldName": "asset.reservedFor",
      "value": "JIRAUSER10103"
    },
    {
      "fieldName": "asset.managedBy",
      "value": "JIRAUSER10103"
    },
    {
      "fieldName": "asset.belongsToGroup",
      "value": "[\"jira-servicedesk-users\"]"
    },
    {
      "fieldName": "asset.quantity",
      "value": 2
    },
    {
      "fieldName": "asset.assetTag",
      "value": "SAMPLEV2"
    },
    {
      "fieldName": "asset.serialNumber",
      "value": "SAMP2313"
    },
    {
      "fieldName": "asset.installDate",
      "value": "2020-05-06"
    },
    {
      "fieldName": "asset.location",
      "value": 11
    },
    {
      "fieldName": "asset.cost",
      "value": 3213
    },
    {
      "fieldName": "asset.invoiceNumber",
      "value": "INV9999"
    }
  ]
}
Sample Response
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : 204,
  "pagingInfo" : null
}

Bulk update selected

MethodPOST
URL/rest/jip-api/1.0/asset-operations/bulk-update.json
Request Body
{
  "operation": 1,
  "sync": false,
  "assetIds": [
    94,
    95
  ],
  "attributes": [
    {
      "attributeId": "19",
      "attributeValue": "text example"
    },
    {
      "attributeId": "24",
      "attributeValue": "127.0.0.3"
    },
    {
      "attributeId": "25",
      "attributeValue": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
    },
    {
      "attributeId": "27",
      "attributeValue": "3"
    },
    {
      "attributeId": "28",
      "attributeValue": "4"
    },
    {
      "attributeId": "29",
      "attributeValue": "3"
    },
    {
      "attributeId": "30",
      "attributeValue": "2020-05-12"
    },
    {
      "attributeId": "31",
      "attributeValue": "2020-05-05T10:25"
    },
    {
      "attributeId": "33",
      "attributeValue": "armagan"
    },
    {
      "attributeId": "34",
      "attributeValue": "L"
    },
    {
      "attributeId": "35",
      "attributeValue": "S@@@@@@T"
    },
    {
      "attributeId": "36",
      "attributeValue": 65757
    },
    {
      "attributeId": "37",
      "attributeValue": 3124124
    },
    {
      "attributeId": "38",
      "attributeValue": "O"
    },
    {
      "attributeId": "39",
      "attributeValue": "text area example"
    },
    {
      "attributeId": "40",
      "attributeValue": "http://snapbytes.com"
    },
    {
      "attributeId": 27,
      "attributeValue": ""
    },
    {
      "attributeId": 28,
      "attributeValue": ""
    },
    {
      "attributeId": 29,
      "attributeValue": ""
    },
    {
      "attributeId": 30,
      "attributeValue": ""
    },
    {
      "attributeId": 31,
      "attributeValue": ""
    },
    {
      "attributeId": 36,
      "attributeValue": ""
    },
    {
      "attributeId": 24,
      "attributeValue": ""
    },
    {
      "attributeId": 25,
      "attributeValue": ""
    },
    {
      "attributeId": 33,
      "attributeValue": ""
    },
    {
      "attributeId": 34,
      "attributeValue": ""
    },
    {
      "attributeId": 35,
      "attributeValue": ""
    },
    {
      "attributeId": 37,
      "attributeValue": ""
    },
    {
      "attributeId": 38,
      "attributeValue": ""
    },
    {
      "attributeId": 19,
      "attributeValue": ""
    },
    {
      "attributeId": 39,
      "attributeValue": ""
    },
    {
      "attributeId": 40,
      "attributeValue": ""
    }
  ],
  "systemFields": [
    {
      "fieldName": "asset.costCurrency",
      "value": "TRY"
    },
    {
      "fieldName": "asset.status",
      "value": "2"
    },
    {
      "fieldName": "asset.substatus",
      "value": null
    },
    {
      "fieldName": "asset.assignee",
      "value": "JIRAUSER10100"
    },
    {
      "fieldName": "asset.owner",
      "value": "JIRAUSER10100"
    },
    {
      "fieldName": "asset.managedBy",
      "value": "JIRAUSER10100"
    },
    {
      "fieldName": "asset.reservedFor",
      "value": "JIRAUSER10100"
    },
    {
      "fieldName": "asset.belongsToGroup",
      "value": "[\"jira-software-users\"]"
    },
    {
      "fieldName": "asset.assetTag",
      "value": "12"
    },
    {
      "fieldName": "asset.serialNumber",
      "value": "SAMP88738636"
    },
    {
      "fieldName": "asset.installDate",
      "value": "2020-05-09"
    },
    {
      "fieldName": "asset.location",
      "value": 11
    },
    {
      "fieldName": "asset.cost",
      "value": 34312
    },
    {
      "fieldName": "asset.invoiceNumber",
      "value": "INV123123"
    },
    {
      "fieldName": "asset.quantity",
      "value": ""
    }
  ]
}
Sample Response
{
  "success" : true,
  "errorCode" : null,
  "errorMessage" : null,
  "data" : 206,
  "pagingInfo" : null
}
  • No labels