# Create up to 500 software metering rules in a single request Allows you to add multiple software metering rules at once (up to 500). Each rule is processed individually — successfully created rules are saved, while any that fail validation are reported back with the reason for failure. ## Endpoint **POST** `/dcapi/inventory/software/metering/bulk` ## Request ### Request URL `https://`[*{serverurl}*](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)`/dcapi/inventory/software/metering/bulk` ### Scope `DesktopCentralCloud.Inventory.CREATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers | Parameter | Type | Requirement | Value | |---|---|---|---| | Accept | string | Mandatory | `application/bulkRuleAddStatus.v1+json` | | Content-Type | string | Mandatory | `application/bulkAddMeteringRules.v1+json` | #### Request Body `application/json` | Parameter | Type | Requirement | |---|---|---| | rules | JSON Array | Mandatory | ### Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/inventory/software/metering/bulk \ --header 'Accept: application/bulkRuleAddStatus.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/bulkAddMeteringRules.v1+json' \ --data '{"rules":[{"fileName":"string","softwareID":0,"ruleName":"string","osPlatform":0}]}' ``` ### Sample Request Body ```json { "rules": [ { "softwareID": 0, "osPlatform": 0, "ruleName": "string", "fileName": "string", "originalFileName": "string", "fileVersion": "string", "productName": "string", "comments": "string" } ] } ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | status | string | Overall outcome - SUCCESS (all entries inserted), PARTIAL_SUCCESS (mix of inserted and failed) or FAILURE (zero inserted) | | summary | JSON Object | Counts: totalRequested, successCount, failedCount | | succeeded | array | Entries inserted successfully. Each item carries softwareID, osPlatform, ruleName and the generated appDefinitionID | | failed | array | Entries rejected by validation or DB write (including duplicate rule names). Each item carries errorCode, errorMessage and the original input object echoed back | ### HTTP Code 400 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | error_code | string | CUSTOMER_HEADER_MISSING - MSP environment requires X-Customer header | | error_description | string | Missing customer header error message | ### HTTP Code 401 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | error_code | string | UAC_UNAUTHORIZED - user lacks the required uem-roles or credentials are missing | | error_description | string | Authentication or authorization failure reason | ### HTTP Code 500 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | error_code | string | INTERNAL_ERROR - unexpected exception in the service layer | | error_description | string | Internal server error message | ### Possible Response Codes | HTTP Code | |---| | 200 | | 400 | | 401 | | 500 | ## Sample Responses ### HTTP 200 Mixed bulk add outcome ```json { "summary": { "failedCount": 2, "successCount": 1, "totalRequested": 3 }, "failed": [ { "input": { "originalFileName": "Google Chrome.app", "fileName": "Google Chrome", "softwareID": 67890, "comments": "Track Chrome on Mac", "ruleName": "Chrome - Mac", "osPlatform": 2, "fileVersion": "", "productName": "Google Chrome" }, "errorMessage": "ruleName 'Chrome - Mac' is already in use", "errorCode": "DUPLICATE_RULE_NAME" }, { "input": { "originalFileName": "notepad++.exe", "fileName": "notepad++.exe", "softwareID": 789, "comments": "", "ruleName": "Notepad++ - Windows", "osPlatform": 1, "fileVersion": "", "productName": "Notepad++" }, "errorMessage": "Software 789 is not detected on osPlatform 1", "errorCode": "OS_PLATFORM_MISMATCH" } ], "status": "PARTIAL_SUCCESS", "succeeded": [ { "softwareID": 67890, "appDefinitionID": 9001, "ruleName": "Chrome - Windows", "osPlatform": 1 } ] } ``` ### HTTP 400 rules array missing, empty or above 500 ```json { "error_description": "rules array is required and must contain 1-500 entries", "error_code": "INVALID_DATA" } ``` ### HTTP 401 Caller lacks Inventory_Admin role ```json { "error_description": "Unauthorized access", "error_code": "UAC_UNAUTHORIZED" } ``` ### HTTP 500 Server error ```json { "error_description": "Internal server error", "error_code": "INTERNAL_ERROR" } ``` ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.