# Addigy

> Manage Apple devices: search devices, manage policies, custom facts, static fields and variables, and follow alerts and system events.

App · 28 actions. Web page: https://docs.lodol.com/docs/integrations/addigy

## Actions

### Create a custom fact

Create a custom fact: a macOS script whose output Addigy collects from every device.

**Inputs**

- Name (`name`, text, required): The custom fact's name.
- Returns (`return_type`, text, required): What the script's output is. One of: `string`, `number`, `boolean`, `list`.
- Script (`script`, text, required): The macOS script. What it prints is the fact's value.
- Language (`language`, text): The script's language. Bash when left empty. One of: `bash`, `zsh`, `python`.
- Notes (`notes`, text): Notes about the fact.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "fact": {
      "id": "example",
      "name": "example",
      "notes": "example",
      "os_architectures": {
        "linux": {
          "is_supported": true,
          "language": "example",
          "script": "example",
          "shebang": "example"
        },
        "macOS": {
          "is_supported": true,
          "language": "example",
          "script": "example",
          "shebang": "example"
        }
      },
      "return_type": "example",
      "version": 1
    }
  }
}
```

### Create a policy

Create a policy, optionally inside a parent policy.

**Inputs**

- Name (`name`, text, required): The policy's name.
- Parent policy (`parent_policy_id`, text): The policy to create it inside.
- Color (`color`, text): The policy's color, as a hex code such as `#1E88E5`.
- Icon (`icon`, text): The policy's icon. One of: `fa fa-user`, `fa fa-users`, `fa fa-trophy`, `fa fa-university`, `fa fa-database`, `fa fa-desktop`, `fa fa-building-o`, `fa fa-lock`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Create a static field

Create a static field.

**Inputs**

- Name (`name`, text, required): The static field's name.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Create a variable

Create a variable with a default value.

**Inputs**

- Key (`key`, text, required): The variable's key, with no spaces.
- Type (`type`, text, required): Text, or a secret whose value is hidden. One of: `string`, `secret`.
- Default value (`default_value`, text): The default value.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "created_date": "example",
    "default_value": "example",
    "key": "example",
    "organization_id": "example",
    "type": "example",
    "updated_date": "example"
  }
}
```

### Delete a custom fact

Delete a custom fact.

**Inputs**

- Custom fact (`custom_fact_id`, text, required): The custom fact.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {}
}
```

### Delete a policy

Delete a policy.

**Inputs**

- Policy (`policy_id`, text, required): The policy.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {}
}
```

### Delete a static field

Delete a static field.

**Inputs**

- Static field (`static_field_id`, text, required): The static field.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {}
}
```

### Delete a variable

Delete a variable.

**Inputs**

- Variable (`key`, text, required): The variable's key.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {}
}
```

### Get a device's MDM details

Get a device's MDM enrollment profile, its last MDM response and the push certificate it uses.

**Inputs**

- Device UDID (`device_uuid`, text, required): The device's UDID (its `udid` fact).

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "apn_certificate": {
      "apns_not_after": "example",
      "apns_topic": "example",
      "apple_id_used": "example",
      "is_expired": true,
      "push_status_reason": "example",
      "status": "example"
    },
    "enrollment profile": {
      "installed_payloads": [
        {
          "display_name": "example",
          "identifier": "example",
          "type": "example",
          "uuid": "example"
        }
      ],
      "last_updated": "example",
      "payload_display_name": "example",
      "payload_identifier": "example",
      "payload_organization": "example",
      "payload_removal_disallowed": true,
      "udid": "example"
    },
    "last_response": {
      "date_time": "example",
      "status": "example"
    }
  }
}
```

### Get the API key's permissions

List the permissions the connected API key has.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "permissions": [
      "example"
    ]
  }
}
```

### List alerts

List the alerts monitoring raised, newest first, by status.

**Inputs**

- Status (`status`, text): Which alerts to list. One of: `All`, `Unattended`, `Acknowledged`, `Resolved`. Default: `All`.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "agent_id": "example",
        "category": "example",
        "created_date": "example",
        "emails": [
          "example"
        ],
        "fact_identifier": "example",
        "fact_name": "example",
        "id": "example",
        "level": "example",
        "name": "example",
        "orgid": "example",
        "remediation_enabled": true,
        "remediation_time": 1,
        "resolved_date": "example",
        "resolved_user_email": "example",
        "seconds_to_resolved": 1,
        "selector": "example",
        "status": "example",
        "value": "example"
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List child organizations

List the organizations under this one, for partners managing several clients.

**Inputs**

- Search (`search`, text): Only organizations whose name contains this text.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "company_name": "example",
        "device_count": 1,
        "email": "example",
        "enabled": true,
        "first_name": "example",
        "last_name": "example",
        "organization_id": "example",
        "parent": "example",
        "subdomain": "example"
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List custom facts

List custom facts, optionally only those whose name contains some text.

**Inputs**

- Name contains (`name_contains`, text): Only custom facts whose name contains this text.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "id": "example",
        "name": "example",
        "notes": "example",
        "os_architectures": {
          "linux": {
            "is_supported": true,
            "language": "example",
            "script": "example",
            "shebang": "example"
          },
          "macOS": {
            "is_supported": true,
            "language": "example",
            "script": "example",
            "shebang": "example"
          }
        },
        "return_type": "example",
        "version": 1
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List files

List the files uploaded to the organization, newest first.

**Inputs**

- Search (`search`, text): Only files whose name contains this text.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "content_type": "example",
        "created": "example",
        "filename": "example",
        "id": "example",
        "md5_hash": "example",
        "orgid": "example",
        "provider": "example",
        "size": 1,
        "user_email": "example"
      }
    ]
  }
}
```

### List maintenance items

List maintenance items (scheduled scripts), optionally only those whose name contains some text.

**Inputs**

- Name contains (`name_contains`, text): Only items whose name contains this text.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "day": "example",
        "description": "example",
        "frequency": "example",
        "id": "example",
        "max_try_count": 1,
        "name": "example",
        "policies": [
          "example"
        ],
        "prompt_user": true,
        "scheduled_time": "example",
        "version": 1
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List MDM profiles

List the organization's MDM configuration profiles.

**Inputs**

- Payload type (`payload_type`, text): Only profiles of this payload type, such as `com.apple.wifi.managed`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "profiles": [
      {
        "addigy_payload_type": "example",
        "payload_display_name": "example",
        "payload_enabled": true,
        "payload_group_id": "example",
        "payload_identifier": "example",
        "payload_type": "example",
        "payload_uuid": "example",
        "payload_version": 1,
        "requires_device_supervision": true
      }
    ]
  }
}
```

### List monitoring items

List monitoring items (the rules that raise alerts), optionally only those whose name contains some text.

**Inputs**

- Name contains (`name_contains`, text): Only items whose name contains this text.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "category": "example",
        "emails": [
          "example"
        ],
        "fact": "example",
        "fact_identifier": "example",
        "id": "example",
        "level": "example",
        "name": "example",
        "remediation_enabled": true,
        "selector": "example",
        "value": "example",
        "version": 1
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List policies

List the organization's policies, or only the ones chosen.

**Inputs**

- Policies (`policies`, list): Only these policies. Leave empty for all.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "agent_version": "example",
        "color": "example",
        "creation_time": "example",
        "download_path": "example",
        "icon": "example",
        "ignore_updates": true,
        "instructions": [
          "example"
        ],
        "last_deployed": "example",
        "name": "example",
        "orgid": "example",
        "parent": "example",
        "policyId": "example",
        "schedules": [
          {
            "fr": true,
            "from": {
              "h": 1,
              "m": 1
            },
            "mo": true,
            "sa": true,
            "su": true,
            "th": true,
            "to": {
              "h": 1,
              "m": 1
            },
            "tu": true,
            "we": true
          }
        ]
      }
    ]
  }
}
```

### List static field values

List the static field values set on devices.

**Inputs**

- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "agentid": "example",
        "static_field_id": "example",
        "value": "example"
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List static fields

List static fields: values an admin sets on devices, such as an asset tag.

**Inputs**

- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List system events

List system events (what people and Addigy did in the organization), newest first.

**Inputs**

- Search (`search`, text): Text to look for.
- Search in (`search_in`, text): Where to look for the text. Leave empty to look anywhere. One of: `any`, `action.name`, `action.details`, `action.entity.name`, `action_sender.name` (Action sender.name), `action_receiver.name` (Action receiver.name), `result.status`, `level`.
- Since (`since`, date): Only events on or after this day.
- Sort direction (`sort_direction`, text): Sort ascending or descending. One of: `asc`, `desc`.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "action": {
          "details": "example",
          "entity": {
            "identifier": "example",
            "name": "example",
            "type": "example"
          },
          "name": "example"
        },
        "action_receiver": {
          "identifier": "example",
          "name": "example",
          "type": "example"
        },
        "action_sender": {
          "identifier": "example",
          "name": "example",
          "type": "example"
        },
        "date": "example",
        "event_id": "example",
        "level": "example",
        "orgid": "example",
        "result": {
          "details": "example",
          "status": "example"
        }
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List users

List the organization's Addigy users and their roles.

**Inputs**

- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "addigy_role": "example",
        "email": "example",
        "name": "example",
        "orgid": "example",
        "phone": "example",
        "policies": [
          "example"
        ]
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### List variables

List variables (values scripts and profiles can use), optionally only those whose key contains some text.

**Inputs**

- Key contains (`key_contains`, text): Only variables whose key contains this text.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "created_date": "example",
        "default_value": "example",
        "key": "example",
        "organization_id": "example",
        "type": "example",
        "updated_date": "example"
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### Rename a static field

Rename a static field.

**Inputs**

- Static field (`static_field_id`, text, required): The static field.
- Name (`name`, text, required): The new name.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {}
}
```

### Restart a device

Send an MDM command that restarts a device.

**Inputs**

- Agent ID (`agent_id`, text, required): The device's agent ID (its `agentid`).

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "CommandUUID": "example",
    "CreatedDate": "example",
    "DeviceUDID": "example",
    "ExpirationDate": "example",
    "LastUpdated": "example",
    "Name": "example",
    "Status": "example"
  }
}
```

### Search devices

Search the organization's devices by any fact (name, serial number, user...) and get their facts.

**Inputs**

- Search (`search`, text): Text to look for in any of a device's facts, such as its name or serial number.
- Policy (`policy_id`, text): Only devices in this policy.
- Facts to return (`facts`, list): Only return these facts, by identifier (such as `device_name`, `serial_number`, `online`). Leave empty for all facts.
- Sort by (`sort_field`, text): The fact to sort by, such as `device_name`.
- Sort direction (`sort_direction`, text): Sort ascending or descending. One of: `asc`, `desc`.
- Page (`page`, number): The page to read, from 1. At least 1. Default: `1`.
- Per page (`per_page`, number): How many records a page holds (up to 1,000). From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "agent_audit_date": "example",
        "agentid": "example",
        "audit_date": "example",
        "facts": {},
        "orgid": "example"
      }
    ],
    "metadata": {
      "page": 1,
      "page_count": 1,
      "per_page": 1,
      "result_count": 1,
      "total": 1
    }
  }
}
```

### Set a static field on devices

Set a static field's value on one or more devices.

**Inputs**

- Static field (`static_field_id`, text, required): The static field.
- Agent IDs (`agent_ids`, list, required): The devices' agent IDs.
- Value (`value`, text, required): The value to set.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "agentid": "example",
    "static_field_id": "example",
    "value": "example"
  }
}
```

### Update a policy

Rename a policy or change its color or icon.

**Inputs**

- Policy (`policy_id`, text, required): The policy.
- Name (`name`, text, required): The policy's name.
- Color (`color`, text): The policy's color, as a hex code such as `#1E88E5`.
- Icon (`icon`, text): The policy's icon. One of: `fa fa-user`, `fa fa-users`, `fa fa-trophy`, `fa fa-university`, `fa fa-database`, `fa fa-desktop`, `fa fa-building-o`, `fa fa-lock`.

**Outputs**

- `data` (object): The response from Addigy.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```
