Homepage 5 API Documentation 5 Making Example Calls

Making Example Calls

 

Once you authenticate yourself, you can start making API calls to Action1 resources. For example, you can query the list of available organizations or managed endpoints.

Retrieving Organizations

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",
  "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>"
}

Retrieving Managed Endpoints for a Specific Organization

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.

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

Response:

{
  "id": "1",
  "type": "ResultPage",
  "name": "",
  "self": "https://app.action1.com/api/3.0/endpoints/managed/<organization_id>",
  "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>",
      "missing_critical_updates": "<missing_critical_updates>",
      "missing_other_updates": "<missing_other_updates>",
      "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>"
    }
  ],
  "total_items": "<total_items>",
  "limit": "50",
  "next_page": "<next_page>",
  "prev_page": "<prev_page>"
}