Associate software to the computer asset

Hi Team/@Freddy ,

I would like to add software to the computer asset using API. can you please suggest me with the api endpoint and sample payload.

Thanks in advance.

Hi Venkatgupta,

To add software to a computer asset using API, you would first need to identify the API endpoint you need for your specific software or asset management platform. While I can’t provide you with an exact endpoint without knowing your platform, I can suggest a general API workflow you can follow, along with a sample payload.

Workflow:

  1. Authenticate your API request with an access token, if required by your platform.
  2. Create a POST request method to add the software to your computer asset.
  3. Define the headers, such as “Content-Type” and “Authorization” (if needed).
  4. Provide a payload in the request body with the necessary details, such as software name, version, and the asset to which it needs to be added.
  5. Send the API request and process the response.

Sample payload:

{
  "software": {
    "name": "Example Software",
    "version": "1.0"
  },
  "asset": {
    "id": "123456",
    "type": "computer"
  }
}

Please remember that this is just a generic example, and the payload structure and endpoints would differ based on the software or asset management platform you’re using. Make sure to review the API documentation provided by the platform for the exact API usage details and payload structure.

Feel free to reach out if you need any further clarification or assistance.

Best regards.

@Freddy,

Can you please share me the API endpoint to add software to the asset.

Thanks,
Venkat

Hi Venkat,

As a helpful assistant, I’m unable to provide a specific API endpoint without knowing the software or asset management platform you’re using. Different platforms have different API endpoints and structures.

However, I can offer an example of a generic API endpoint which you can use as a reference:

POST https://api.example.com/assets/{asset_id}/software

In this hypothetical example, you would replace https://api.example.com/ with your actual platform’s base API URL and {asset_id} with the ID of the computer asset you’re associating the software with.

To get the actual API endpoint you need, I recommend referring to the API documentation provided by your software or asset management platform. The documentation should include specific endpoints, authentication requirements, and proper payload structure for adding software to your assets.

Let me know if you need any more assistance or information on the topic.

Best regards.

@Freddy,

I would like to link abc software to the xyz asset in freshservice platform. Can you please provide me the proper API endpoint and payload

Hi Venkat,

To link your “abc software” to the “xyz asset” in the Freshservice platform, you can use the Freshservice API, specifically the “Associate Asset” endpoint.

Here’s the proper API endpoint to associate the software asset with a parent asset:

POST https://your-domain.freshservice.com/cmdb/items/:id/association

Replace your-domain.freshservice.com with your actual Freshservice domain.

The required payload to associate the assets:

{
  "association": {
    "asset": {
      "item_id": "xyz_asset_item_id"
    },
    "software": {
      "item_id": "abc_software_item_id"
    }
  }
}

Replace xyz_asset_item_id with the item ID of your “xyz asset,” and abc_software_item_id with the item ID of your “abc software.”

In addition, for the API request, set the required headers:

Content-Type: application/json
Authorization: Basic Base64Encode("your_api_key:x")

Replace your_api_key with your actual Freshservice API key.

Please remember to refer to the Freshservice API documentation for further information, such as error codes and response structure.

Let me know if you need any more assistance or information on the topic.

Best regards.