# Retrieve license details for a software Returns all license details associated with a specified software ID. ## Endpoint `GET /dcapi/inventory/viewData/licenseBySW` ## Request ### Request URL https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/inventory/viewData/licenseBySW ### Scope `DesktopCentralCloud.Inventory.READ` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Accept** (`string`, Mandatory): `application/InventoryMobileAPI.v1+json` #### Query Parameters - **toolID** (`string`, Mandatory): Set value as `1140`. - **swID** (`string`, Mandatory): Software ID. Obtain from the response of the [Get Installed Software List](https://www.manageengine.com/products/desktop-central/help/api/cloud/inventory-get-installed-software-list.html) API. ### Sample Request ```curl curl --request GET \ --url 'https://appdomains/dcapi/inventory/viewData/licenseBySW?toolID=1140&swID=SOME_STRING_VALUE' \ --header 'Accept: application/InventoryMobileAPI.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ## Response ### HTTP Code 200 Response Body: `application/json` - **metadata** (`JSON Object`): Pagination metadata. - **totalRecords** (`string`): Total number of records matching the query. - **messageResponse** (`JSON Array`): Array of license detail objects. - **totalPages** (`string`): Total number of pages. - **Links** (`JSON Object`): Pagination links. - **status** (`string`): Response status - success. ### Sample Response: HTTP 200 Licenses for a software ```json { "metadata": { "limit": 25, "page": 1 }, "totalRecords": "1", "messageResponse": [ { "po_file_name": "--", "license_file_name": "--", "edition_name": null, "license_ref_number_transform": "--", "vendor_transform": "--", "po_file_name_transform": "--", "software_name": "Sample Software", "software_version": "24.05", "invoice_number": "--", "managed_sw_id": "51", "license_key_transform": "--", "manufacturer_id": "57", "location_transform": "--", "edition_name_transform": "--", "licensed_to": "--", "license_type_transform": "--", "display_name": "Sample Software", "license_key": "--", "license_ref_number": "--", "purchase_date": "0", "expiry_date_transform": "--", "mapped_resource_count_transform": "1", "po_canonical_path": "--", "invoice_canonical_path": "--", "invoice_file_name": "--", "license_name_transform": "SampleLicense_001", "license_file_name_transform": "--", "license_canonical_path": "--", "software_id": "51", "license_name": "SampleLicense_001", "purchase_date_transform": "--", "po_number": "--", "license_edition_id": null, "vendor": "--", "license_metric_transform": "--", "remarks_transform": "--", "sw_type": "1", "license_details_id": "1", "cost": null, "license_type": null, "expiry_date": "0", "no_of_copies": "5", "manufacturer_name": "Sample Manufacturer", "no_of_copies_transform": "5", "mapped_resource_count": "1", "license_id": "1", "invoice_number_transform": "--", "po_number_transform": "--", "cost_transform": "--", "invoice_file_name_transform": "--", "location": "--", "license_metric": null, "customer_name": "SampleCustomer", "customer_id": "1", "licensed_to_transform": "--", "remarks": "--" } ], "totalPages": 1, "Links": { "next": null, "prev": null }, "status": "success" } ``` ### HTTP Code 500 Response Body: `application/json` - **error_code** (`string`): `INTERNAL_ERROR` - unexpected exception in the service layer. - **error_description** (`string`): Internal server error message. ### Sample Response: HTTP 500 Server error ```json { "error_description": "Internal server error", "error_code": "INTERNAL_ERROR" } ``` ### Possible Response Codes - **200**: HTTP code. - **500**: HTTP code. ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 120 | **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.