Skip to main content

Retrieving Devices

This guide explains how to retrieve device information using the XFA API. You'll learn how to get your organization ID and use it to fetch detailed device data.

note

For details on authenticating your API requests, please refer to the Authentication section.

Using the Base URL and Authentication

To retrieve device information, you'll need to make authenticated requests to the XFA API base URL (https://api.xfa.tech). Here's how to structure your requests:

Getting Your Organization ID

Get your organization details using the following curl command,
replace < ACCESS_TOKEN > with the token obtained during authentication:

Here's a detailed breakdown of the organization details request:

  1. URL:

    • https://api.xfa.tech/organizations
  2. Headers:

    • `Authorization: Bearer < ACCESS_TOKEN >
  3. Method:

    • GET - No request body needed
An example request:
curl https://api.xfa.tech/organizations \
--header 'Authorization: Bearer < ACCESS_TOKEN >'

The API will return your organization details in this format.
Make note of the organization_id as you'll need it for the next step:

 [
{
"organization_id": "…",
"name": "…",
"address": "…",
"zip_code": "…",
"city": "…",
"country": "…",
"vat": "…",
"billing_email": "…",
"deleted": true,
"logo_url": "…",
...
}
]

note: full response can be found in the organization response documentation

Getting Your Devices

Retrieve devices for your organization:
Make sure to replace < ORGANIZATION_ID > with your organization's ID
and < ACCESS_TOKEN > with the authentication token you received in the previous step.

Here's a detailed breakdown of the devices request:

  1. URL:

    • https://api.xfa.tech/devices
    • Required query parameter: organization_id=ORGANIZATION_ID
  2. Headers:

    • Authorization: Bearer ACCESS_TOKEN
  3. Method:

    • GET - No request body needed
An example request:
curl -X GET 'https://api.xfa.tech/devices?organization_id=< ORGANIZATION_ID >' \
-H 'Authorization: Bearer < ACCESS_TOKEN >'

Example response:

{
"devices": [
{
"device_id": "device-123",
"computer_name": "LAPTOP-ABC123",
"os_name": "Windows",
"os_version": "11.0.19045",
"browser_name": "Chrome",
"browser_version": "120.0.6099.130",
"diskencryption_active": true,
"antivirus_enabled": true,
"firewall_enabled": true,
"microsoft_word_version": "16.0.17029",
"microsoft_excel_version": "16.0.17029",
"jailbroken": false,
"rooted": false,
"developer_mode": false,
"os_cves": [],
"browser_cves": []
}
]
}

Try it out in our API playground

You can test these endpoints directly in our API Playground. The playground provides an interactive interface where you can:

  1. Authenticate using your API token
  2. Select the endpoint you want to test
  3. Fill in the required parameters
  4. Execute the request and view the response