# ArcGIS Online

> Work with your organization's maps and data in Esri's ArcGIS Online: start a workflow on a new Survey123 response or a new or changed feature, query, add, update and delete features and their attachments, search items, users and groups, and turn addresses into locations and back.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/arcgis-online

## Actions

### Add attachment

Attach a photo or file to a feature, up to 50 MB.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Object ID (`object_id`, number, required): The feature's object ID, from 'Query features' or a trigger.
- File (`file`, text, required): The file to attach: upload one, pick a file from an earlier step, or give a web address that leads to it.
- File name (`file_name`, text): The name it's saved under. Defaults to the file's own name.

**Outputs**

- `attachment_id` (number): The new attachment's ID
- `global_id` (text): Its global ID, empty if none
- `name` (text): The name it was saved under
- `object_id` (number): The feature
- `size` (number): Size in bytes
- `url` (text): Its address

**Example output**

```json
{
  "attachment_id": 8,
  "global_id": "{1A2B3C4D-5E6F-4A7B-8C9D-0E1F2A3B4C5D}",
  "name": "inspection.pdf",
  "object_id": 42,
  "size": 18234,
  "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0/42/attachments/8"
}
```

### Add feature

Add a feature (a row) to a layer, with its field values and, for a layer of points, where it is.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Fields (`attributes`, object): The values to set, one per field. A date field takes a date, a field with choices takes one of them. Fields left empty are left as they are.
- Latitude (`latitude`, number): Where the feature is, for a layer of points, such as 34.0572. From -90 to 90.
- Longitude (`longitude`, number): Where the feature is, for a layer of points, such as -117.1948. From -180 to 180.

**Outputs**

- `global_id` (text): Its global ID, empty if the layer has none
- `layer` (object): The layer the step used
- `object_id` (number): The new feature's object ID
- `success` (true/false): Always true once added

**Example output**

```json
{
  "global_id": "{8F7A0C1E-2B4D-4E6F-9A1B-3C5D7E9F0A2B}",
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  },
  "object_id": 43,
  "success": true
}
```

### Count features

Count a layer's features, all of them or those matching the filters.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Only where field (`match_field`, text): Keep only features whose value in this field matches Equals.
- Equals (`match_value`, text): The value to keep, picked from the values the field holds or typed. For a date field, every feature on that day matches.
- Date field (`date_field`, text): The date the From and To dates apply to.
- From (`from_date`, date): Only features on or after this date, in the date field.
- To (`to_date`, date): Only features on or before this date, in the date field.
- Advanced filter (`where`, text): A filter in ArcGIS's SQL style, combined with the filters above, for example STATUS = 'Open' AND PRIORITY >= 2.

**Outputs**

- `count` (number): How many features match
- `layer` (object): The layer the step used
- `where` (text): The filter ArcGIS ran

**Example output**

```json
{
  "count": 128,
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  },
  "where": "status = 'Open'"
}
```

### Delete attachment

Delete one attachment from a feature.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Object ID (`object_id`, number, required): The feature's object ID, from 'Query features' or a trigger.
- Attachment ID (`attachment_id`, number, required): The attachment's ID, from 'List attachments'.

**Outputs**

- `attachment_id` (number): The attachment deleted
- `deleted` (true/false): Always true once deleted
- `object_id` (number): The feature

**Example output**

```json
{
  "attachment_id": 8,
  "deleted": true,
  "object_id": 42
}
```

### Delete features

Delete features from a layer by their object IDs.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Object IDs (`object_ids`, list, required): The object IDs of the features to delete, up to 100.

**Outputs**

- `count` (number): How many were deleted
- `deleted_ids` (list): The object IDs deleted
- `failed` (list): Features ArcGIS refused to delete
- `layer` (object): The layer the step used

**Example output**

```json
{
  "count": 1,
  "deleted_ids": [
    43
  ],
  "failed": [],
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  }
}
```

### Find an address

Turn an address or place name into its latitude and longitude, with the address as ArcGIS standardizes it.

**Inputs**

- Address (`address`, text, required): The address or place, as someone would write it.
- Country (`country`, text): Only matches in this country, by its code, such as USA or GB.
- Results (`max_results`, number): How many matches to return, best first, 1 to 20. Defaults to 1. From 1 to 20. Default: `1`.
- Keep the results (`keep_results`, true/false): Turn on if you'll save the result (in a layer, a spreadsheet, a record). Esri's terms require it for saved results; it needs an API key and uses your organization's credits. Default: `false`.

**Outputs**

- `best` (object): The best match, or null
- `count` (number): How many matched
- `found` (true/false): Whether anything matched
- `matches` (list): Every match, best first

**Example output**

```json
{
  "best": {
    "address": "380 New York St, Redlands, CA, 92373, USA",
    "city": "Redlands",
    "country": "United States",
    "country_code": "USA",
    "county": "San Bernardino County",
    "latitude": 34.057241819826,
    "longitude": -117.194835113918,
    "match_type": "PointAddress",
    "postal_code": "92373",
    "region": "California",
    "score": 100,
    "short_address": "380 New York St",
    "street": "380 New York St"
  },
  "count": 1,
  "found": true,
  "matches": [
    {
      "address": "380 New York St, Redlands, CA, 92373, USA",
      "city": "Redlands",
      "country": "United States",
      "country_code": "USA",
      "county": "San Bernardino County",
      "latitude": 34.057241819826,
      "longitude": -117.194835113918,
      "match_type": "PointAddress",
      "postal_code": "92373",
      "region": "California",
      "score": 100,
      "short_address": "380 New York St",
      "street": "380 New York St"
    }
  ]
}
```

### Find the address at a location

Turn a latitude and longitude into the nearest address.

**Inputs**

- Latitude (`latitude`, number, required): The spot's latitude, such as 34.0572. From -90 to 90.
- Longitude (`longitude`, number, required): The spot's longitude, such as -117.1948. From -180 to 180.
- Keep the results (`keep_results`, true/false): Turn on if you'll save the result (in a layer, a spreadsheet, a record). Esri's terms require it for saved results; it needs an API key and uses your organization's credits. Default: `false`.

**Outputs**

- `found` (true/false): Whether an address was found
- `place` (object): The address, or null

**Example output**

```json
{
  "found": true,
  "place": {
    "address": "380 New York St, Redlands, CA, 92373, USA",
    "city": "Redlands",
    "country": "United States",
    "country_code": "USA",
    "county": "San Bernardino County",
    "latitude": 34.057241819826,
    "longitude": -117.194835113918,
    "match_type": "PointAddress",
    "postal_code": "92373",
    "region": "California",
    "short_address": "380 New York St",
    "street": "380 New York St"
  }
}
```

### Get feature

Read one feature by its object ID, with all its fields and its location.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Object ID (`object_id`, number, required): The feature's object ID, from 'Query features' or a trigger.
- Location (`geometry`, text): How each feature's location is returned. Defaults to latitude and longitude. One of: `none` (Leave it out), `location` (Latitude and longitude), `geojson` (Full shape (GeoJSON)). Default: `location`.

**Outputs**

- `feature` (object): One feature: its fields by name (dates as ISO 8601, choices by name), then latitude and longitude, or geometry as GeoJSON
- `layer` (object): The layer the step used
- `object_id` (number): Its object ID

**Example output**

```json
{
  "feature": {
    "CreationDate": "2026-10-28T15:04:11Z",
    "EditDate": "2026-10-28T15:04:11Z",
    "description": "Deep pothole in the right lane",
    "latitude": 34.0572418,
    "longitude": -117.1948351,
    "objectid": 42,
    "request_type": "Pothole",
    "status": "Open"
  },
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  },
  "object_id": 42
}
```

### Get item

Read an item's details: title, type, owner, sharing, description, tags and address. For a Survey123 form, also the layer its answers are saved in.

**Inputs**

- Item (`item`, text, required): The item's ID, or the address of its page.

**Outputs**

- `item` (object): The item

**Example output**

```json
{
  "item": {
    "access": "org",
    "created": "2025-03-02T17:20:00Z",
    "description": "Potholes, graffiti and streetlights reported through the city's form.",
    "id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "item_page": "https://www.arcgis.com/home/item.html?id=4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "modified": "2026-10-28T15:04:11Z",
    "owner": "gis_admin_cityofx",
    "snippet": "Requests reported by residents",
    "survey_layer_url": "",
    "tags": [
      "311",
      "requests"
    ],
    "title": "Service Requests",
    "type": "Feature Service",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer",
    "views": 1532
  }
}
```

### Get layer details

Read a layer's fields (with each field's choices), what kind of shapes it holds, whether it can be edited, whether it keeps attachments and which fields record who changed what.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.

**Outputs**

- `layer` (object): The layer

**Example output**

```json
{
  "layer": {
    "can_add": true,
    "can_delete": true,
    "can_update": true,
    "capabilities": [
      "Create",
      "Delete",
      "Query",
      "Update",
      "Editing"
    ],
    "editor_tracking": {
      "created_field": "CreationDate",
      "creator_field": "Creator",
      "edited_field": "EditDate",
      "editor_field": "Editor"
    },
    "fields": [
      {
        "choices": [
          "Open",
          "Closed"
        ],
        "editable": true,
        "label": "Status",
        "name": "status",
        "required": false,
        "type": "choice"
      }
    ],
    "geometry_type": "point",
    "has_attachments": true,
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "kind": "layer",
    "layer_id": 0,
    "max_record_count": 2000,
    "name": "Service Requests",
    "object_id_field": "objectid",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  }
}
```

### Get my account

See who the API key acts as and in which organization. Without a key, says the connection reads public data only.

**Inputs**: None.

**Outputs**

- `organization` (object): The organization, or null without a key
- `signed_in` (true/false): Whether an API key is connected
- `user` (object): The user the key acts as, or null without a key

**Example output**

```json
{
  "organization": {
    "id": "abc123XYZ",
    "name": "City of X GIS",
    "url": "https://cityofx.maps.arcgis.com"
  },
  "signed_in": true,
  "user": {
    "access": "org",
    "created": "2024-01-15T09:00:00Z",
    "description": "",
    "email": "jsmith@cityofx.gov",
    "full_name": "Jo Smith",
    "last_login": "2026-10-29T13:45:00Z",
    "role": "org_publisher",
    "user_type": "creatorUT",
    "username": "jsmith_cityofx"
  }
}
```

### Get user

Read a user's profile: name, role and when they last signed in.

**Inputs**

- User name (`username`, text, required): Their ArcGIS user name.

**Outputs**

- `user` (object): An ArcGIS user

**Example output**

```json
{
  "user": {
    "access": "org",
    "created": "2024-01-15T09:00:00Z",
    "description": "",
    "email": "jsmith@cityofx.gov",
    "full_name": "Jo Smith",
    "last_login": "2026-10-29T13:45:00Z",
    "role": "org_publisher",
    "user_type": "creatorUT",
    "username": "jsmith_cityofx"
  }
}
```

### List attachments

List the photos and files attached to a feature, with a link to each.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Object ID (`object_id`, number, required): The feature's object ID, from 'Query features' or a trigger.

**Outputs**

- `attachments` (list): The attachments
- `count` (number): How many
- `layer` (object): The layer the step used
- `object_id` (number): The feature

**Example output**

```json
{
  "attachments": [
    {
      "content_type": "image/jpeg",
      "id": 7,
      "keywords": "photo",
      "name": "pothole.jpg",
      "size": 248951,
      "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0/42/attachments/7"
    }
  ],
  "count": 1,
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  },
  "object_id": 42
}
```

### List group members

List who is in a group: its owner, its managers and its members.

**Inputs**

- Group (`group`, text, required): The group. Pick one of yours, or give its ID.

**Outputs**

- `count` (number): How many people
- `members` (list): Everyone in the group
- `owner` (text): The owner's user name

**Example output**

```json
{
  "count": 2,
  "members": [
    {
      "role": "owner",
      "username": "gis_admin_cityofx"
    },
    {
      "role": "member",
      "username": "jsmith_cityofx"
    }
  ],
  "owner": "gis_admin_cityofx"
}
```

### List layers and tables

List the layers and tables a feature layer holds, with their IDs and kinds.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.

**Outputs**

- `count` (number): How many
- `layers` (list): Its layers and tables
- `service_url` (text): The feature service's address
- `title` (text): The item's title, empty for a pasted address

**Example output**

```json
{
  "count": 1,
  "layers": [
    {
      "geometry_type": "point",
      "id": 0,
      "kind": "layer",
      "name": "Requests",
      "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
    }
  ],
  "service_url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer",
  "title": "Service Requests"
}
```

### Query features

Get a layer's features (its rows, such as Survey123 responses), filtered by a field value, a date range or an advanced filter, sorted and with only the fields you choose.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Only where field (`match_field`, text): Keep only features whose value in this field matches Equals.
- Equals (`match_value`, text): The value to keep, picked from the values the field holds or typed. For a date field, every feature on that day matches.
- Date field (`date_field`, text): The date the From and To dates apply to.
- From (`from_date`, date): Only features on or after this date, in the date field.
- To (`to_date`, date): Only features on or before this date, in the date field.
- Advanced filter (`where`, text): A filter in ArcGIS's SQL style, combined with the filters above, for example STATUS = 'Open' AND PRIORITY >= 2.
- Fields (`fields`, list): The fields each feature includes. Leave empty for all of them.
- Sort by (`order_by`, text): The field to sort by. Defaults to the order features were added.
- Order (`order`, text): Ascending or descending. Defaults to ascending. One of: `asc` (Ascending (A to Z, oldest first, smallest first)), `desc` (Descending (Z to A, newest first, largest first)). Default: `asc`.
- Location (`geometry`, text): How each feature's location is returned. Defaults to latitude and longitude. One of: `none` (Leave it out), `location` (Latitude and longitude), `geojson` (Full shape (GeoJSON)). Default: `location`.
- Limit (`limit`, number): How many features to return, 1 to 2000. Defaults to 100. From 1 to 2000. Default: `100`.
- Skip (`offset`, number): How many matching features to skip first, for paging. At least 0.

**Outputs**

- `count` (number): How many were returned
- `features` (list): The features
- `has_more` (true/false): Whether more features match than were returned
- `layer` (object): The layer the step used
- `where` (text): The filter ArcGIS ran

**Example output**

```json
{
  "count": 1,
  "features": [
    {
      "CreationDate": "2026-10-28T15:04:11Z",
      "EditDate": "2026-10-28T15:04:11Z",
      "description": "Deep pothole in the right lane",
      "latitude": 34.0572418,
      "longitude": -117.1948351,
      "objectid": 42,
      "request_type": "Pothole",
      "status": "Open"
    }
  ],
  "has_more": false,
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  },
  "where": "status = 'Open'"
}
```

### Search groups

Find groups in your organization by name, or list the groups you're in.

**Inputs**

- Search for (`query`, text): Words in the group's title or description.
- Only my groups (`only_mine`, true/false): Only groups the API key's account belongs to. Default: `false`.
- Limit (`limit`, number): How many groups to return, 1 to 100. Defaults to 20. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many are in this page
- `groups` (list): The groups found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "access": "org",
      "created": "2024-02-01T10:00:00Z",
      "id": "9b2f0d7e3a914c1e5ab0f1d84e4b9c6a",
      "owner": "gis_admin_cityofx",
      "snippet": "Maps and layers for public works crews",
      "title": "Field crews"
    }
  ],
  "total": 1
}
```

### Search items

Find maps, feature layers, Survey123 forms, apps and files in your organization, among your own items, in a group, or across public ArcGIS Online.

**Inputs**

- Search for (`query`, text): Words to look for in titles, tags and descriptions.
- Type (`item_type`, text): Only items of this type. Defaults to any type. One of: `any` (Any type), `feature_layer` (Feature layers), `survey` (Survey123 forms), `web_map` (Web maps), `app` (Apps), `dashboard` (Dashboards), `story` (StoryMaps), `csv` (CSV files), `excel` (Excel files), `pdf` (PDF files). Default: `any`.
- Search in (`scope`, text): Where to look. Your organization by default, or all of public ArcGIS Online without an API key. One of: `organization` (My organization (the default with an API key)), `mine` (Only items I own), `public` (Everything public on ArcGIS Online (the default without a key)).
- Group (`group`, text): Only items shared with this group.
- Sort (`sort`, text): The order of the results. Defaults to recently changed first. One of: `modified` (Recently changed first), `created` (Newest first), `title` (Title, A to Z), `views` (Most viewed first). Default: `modified`.
- Limit (`limit`, number): How many items to return, 1 to 100. Defaults to 20. From 1 to 100. Default: `20`.
- Start at (`start`, number): The 'next_start' of an earlier search, for the next page. From 1 to 10000.

**Outputs**

- `count` (number): How many are in this page
- `items` (list): The items found
- `next_start` (number): Start at for the next page, null on the last
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "access": "org",
      "created": "2025-03-02T17:20:00Z",
      "description": "Potholes, graffiti and streetlights reported through the city's form.",
      "id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
      "item_page": "https://www.arcgis.com/home/item.html?id=4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
      "modified": "2026-10-28T15:04:11Z",
      "owner": "gis_admin_cityofx",
      "snippet": "Requests reported by residents",
      "tags": [
        "311",
        "requests"
      ],
      "title": "Service Requests",
      "type": "Feature Service",
      "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer",
      "views": 1532
    }
  ],
  "next_start": null,
  "total": 1
}
```

### Search users

Find people in your organization by name, user name or email.

**Inputs**

- Search for (`query`, text): A name, user name or email. Leave empty for everyone.
- Limit (`limit`, number): How many users to return, 1 to 100. Defaults to 20. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many are in this page
- `total` (number): How many match in all
- `users` (list): The users found

**Example output**

```json
{
  "count": 1,
  "total": 1,
  "users": [
    {
      "access": "org",
      "created": "2024-01-15T09:00:00Z",
      "description": "",
      "email": "jsmith@cityofx.gov",
      "full_name": "Jo Smith",
      "last_login": "2026-10-29T13:45:00Z",
      "role": "org_publisher",
      "user_type": "creatorUT",
      "username": "jsmith_cityofx"
    }
  ]
}
```

### Update feature

Change a feature's field values or move it. Only the fields you fill in change.

**Inputs**

- Feature layer (`layer`, text, required): The feature layer: pick one of your organization's, or paste its address, its item ID or a Survey123 form's item ID.
- Layer (`layer_id`, text): Which of its layers or tables. Leave empty for the first one.
- Object ID (`object_id`, number, required): The feature's object ID, from 'Query features' or a trigger.
- Fields (`attributes`, object): The values to set, one per field. A date field takes a date, a field with choices takes one of them. Fields left empty are left as they are.
- Latitude (`latitude`, number): Where the feature is, for a layer of points, such as 34.0572. From -90 to 90.
- Longitude (`longitude`, number): Where the feature is, for a layer of points, such as -117.1948. From -180 to 180.

**Outputs**

- `layer` (object): The layer the step used
- `object_id` (number): The feature changed
- `success` (true/false): Always true once changed
- `updated_fields` (list): The fields set

**Example output**

```json
{
  "layer": {
    "item_id": "4c1e5ab0f1d84e4b9c6a8b2f0d7e3a91",
    "name": "Service Requests",
    "url": "https://services.arcgis.com/abc123/arcgis/rest/services/Requests/FeatureServer/0"
  },
  "object_id": 42,
  "success": true,
  "updated_fields": [
    "status"
  ]
}
```
