Example: Get Computers

Use the CAM REST API Discovery Tool to get a list of computers. Learn how to filter, shape, and sort the list of computers returned from the CAM database.

  1. Get an API key. See Create an API Key.
  2. Open the CAM REST API Discovery Tool using this URL: https://{API host name}/cam/docs/index.html.
  3. Generate an access token. See Access Tokens for the CAM REST API.
  4. Use the access token to authorize CAM REST API use. See Use Tokens to Authorize Access to the CAM REST API Discovery Tool.
  5. Scroll to the Computer section.
  6. Select Get for the /cam/api/v1/hardware/computers operation.
  7. Select Try it out, and then select Execute.
    A list of 10 computers is returned by default.
  8. Optionally, use query parameters to refine the list:
    Option Description
    page Specify the page number of the result set to return per page. For example, if 105 computers are returned and the page size is 10, page=1 returns items 1-10, page=5 returns items 41-50, etc.
    pageSize Specify the number of line items to return. The default setting is 10.
    sort Sort the list by field name and order. Example:
    • Name desc sorts the list by name in descending order.
    filter Limit the returned list based on items that meet specific criteria. Examples:
    • Name like "john*" returns only computers with names that start with "john."
    • not IsCamAgentInstalled returns computers on which the CAM Agent has not been installed.
    fields Include only data you care about by adding fields. Examples:
    • Name, DomainName, IsCamAgentInstalled, OSPlatformName includes data for these fields and omits data for all other fields.
  9. Optionally, combine parameters to fully refine your list.
  10. Select Execute, and then compare the request URL to the query parameters you provided.
    This example is returned for these query parameters:
    • page: 2
    • pageSize: 15
    • sort: Name desc
    • filter: not IsCamAgentInstalled
    • fields: Name, DomainName, OSPlatformName

    https://{API host name}/cam/api/v1/hardware/computers?page=2&pageSize=15&sort=Name%20desc&filter=not%20IsCamAgentInstalled&fields=Name%2C%20DomainName%2C%20OSPlatformName