FROM CHAOS TO COMPLIANCE

This Wednesday | 12 PM EDT / 4 PM CEST

Homepage 5 API Documentation 5 Making Example Calls

Making Example Calls

NOTE: We recommend using PSAction1 PowerShell module for substantially simplified API scripting experience.

Once you authenticate yourself, you can start making API calls to Action1 resources. For example, you can query the list of available organizations and check the patching status of managed endpoints belonging to these organizations.

Getting Information about Organizations

Action1 enables you to create multiple units – organizations. At the organization level, you can set up patch management policies, roll out updates, etc. Get an overview of organizations you currently manage within your Action1 tenant account.

Request:

Send a GET request to /organizations. Make sure to provide the JWT token you received during authentication.

curl -XGET -H "Authorization: Bearer JWT-TOKEN" https://app.action1.com/api/3.0/organizations

Response:

{
  "id": "1",
  "type": "ResultPage",
  "name": "",
  "self": "https://app.action1.com/api/3.0/organizations?from=0&limit=50"",
  "items": [
    {
      "id": "<organization_id>",
      "type": "Organization",
      "self": "https://app.action1.com/api/3.0/organizations/<organization_id>",
      "name": "<organization_name>”,
      "description": "<organization_description>”,
      "access": "https://app.action1.com/api/3.0/organizations/<organization_id>/access"
    }
  ],
  "total_items": "<total_items>",
  "limit": "50",   
  "next_page": "<next_page>",   
  "prev_page": "<prev_page>"
}

Obtaining the Patching Status of Managed Endpoints

Action1 enables you to query information about the endpoints belonging to a specific organization along with their patch status. Get an insight into how patch management policies are executed across your organization and verify the current patch status of each endpoint. Locate missing critical updates and patches.

Request:

Send a GET request to /endpoints/managed/{organization_id} with organization_id from a previous query. Make sure to provide the JWT token you received during authentication. This query will return the list of endpoints that belong to your organization. Add ?fields=* to the end of the query to retrieve extended details for the endpoints, including their patching status.

curl -XGET -H "Authorization: Bearer JWT-TOKEN" https://app.action1.com/api/3.0/endpoints/managed/{organization_id}?fields=*

 

Response:

{
  "id": "1",
  "type": "ResultPage",
  "name": "",
  "self": "https://app.action1.com/api/3.0/endpoints/managed/<organization_id>?fields=%2A&from=0&limit=50",
  "items": [
    {
      "OS": "<endpoint_os_name>",
      "address": "<address>",
      "agent_install_date": "<install_date>",
      "agent_version": "<agent_version>",
      "external_address": "<external_address>",
      "id": "<endpoint_id>",
      "last_seen": "<last_seen>",
      "name": "<endpoint_name>",
      "platform": "<endpoint_platform>",
      "self": "https://app.action1.com/api/3.0/endpoints/managed/<organization_id>/<endpoint_id>",
      "status": "<endpoint_status>",
      "subscription_status": "<endpoint_subscription_status>",
      "type": "<endpoint_type>",
      "user": "<user_name>",
      "comment": "<your_comment>",
      "missing_critical_updates": "<missing_critical_updates>",
      "missing_other_updates": "<missing_other_updates>"
    }
  ],
  "total_items": "<total_items>",
  "limit": "50",
  "next_page": "<next_page>",
  "prev_page": "<prev_page>"
}
 

Comparing to Web Console

With Action1 API, you can retrieve the same information that you see in the web console. Compare the results your query returned with the information from the Endpoints dashboard.

Information about a managed endpoint, including its patching status