# Cartegraph

> Enter and update requests, tasks and work orders, find and update assets such as signs and storm inlets, attach photos, and start workflows when requests and tasks come in or tasks are completed.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/cartegraph

## Actions

### Add attachment

Attach a file, such as a photo, to a request, task, work order or asset. Give a file, or text to attach as a text file.

**Inputs**

- Record type (`record_type`, text, required): Requests, tasks, work orders, or a kind of asset.
- Oid (`oid`, text, required): The record's Oid, Cartegraph's number for it, from a trigger or a search.
- File (`file`, text): The file to attach: upload one or pick one from an earlier step.
- Text (`content`, text): Text to attach as a text file, when no file is given.
- File name (`file_name`, text): The file's name with its extension, such as photo.jpg.

**Outputs**

- `attachment_oid` (number): The new attachment's Oid
- `file_name` (text): The name Cartegraph saved the file as
- `oid` (number): The record's Oid, Cartegraph's number for it
- `record_type` (text): The record's recordset
- `size` (number): The file's size in bytes

**Example output**

```json
{
  "attachment_oid": 1495227177,
  "file_name": "pothole.jpg",
  "oid": 1495227176,
  "record_type": "cgRequestsClass",
  "size": 48213
}
```

### Complete task

Mark a task Completed, optionally with when the work finished and a note.

**Inputs**

- Oid (`oid`, text, required): The task's Oid, Cartegraph's number for it, from a trigger or a search.
- Finished (`finished`, date and time): When the work finished.
- Notes (`notes`, text): Notes to save on the task.

**Outputs**

- `task` (object): A Cartegraph task, with every field of the recordset by its field name

**Example output**

```json
{
  "task": {
    "ActivityField": "Patch",
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 242283165,
    "StatusField": "Completed",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Create asset

Add an asset, such as a new sign, from field values.

**Inputs**

- Kind of asset (`asset_type`, text, required): The kind of asset, such as Signs.
- Fields (`fields`, object, required): The asset's field values, by field. Fields left out are not changed.

**Outputs**

- `asset` (object): A Cartegraph asset, with every field of its recordset by its field name
- `asset_type` (text): The asset's recordset
- `oid` (number): The record's Oid, Cartegraph's number for it

**Example output**

```json
{
  "asset": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "Sign-50",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 435560664,
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  },
  "asset_type": "cgSignsClass",
  "oid": 435560664
}
```

### Create request

Make a request in Cartegraph from field values.

**Inputs**

- Fields (`fields`, object, required): The request's field values, by field. Fields left out are not changed.

**Outputs**

- `oid` (number): The record's Oid, Cartegraph's number for it
- `request` (object): A Cartegraph request, with every field of the recordset by its field name

**Example output**

```json
{
  "oid": 1495227176,
  "request": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 1495227176,
    "StatusField": "Open",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Create task

Make a task, such as patching a pothole, optionally on an asset.

**Inputs**

- Activity (`activity`, text): The work to do, such as Patch.
- Fields (`fields`, object): The task's field values, by field. Fields left out are not changed.
- Kind of asset (`asset_type`, text): To make the task on an asset: its kind, such as Signs.
- Asset Oid (`asset_oid`, text): To make the task on an asset: the asset's Oid.

**Outputs**

- `oid` (number): The record's Oid, Cartegraph's number for it
- `task` (object): A Cartegraph task, with every field of the recordset by its field name

**Example output**

```json
{
  "oid": 242283165,
  "task": {
    "ActivityField": "Patch",
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 242283165,
    "StatusField": "Planned",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Create work order

Make a work order in Cartegraph from field values.

**Inputs**

- Fields (`fields`, object, required): The work order's field values, by field. Fields left out are not changed.

**Outputs**

- `oid` (number): The record's Oid, Cartegraph's number for it
- `work_order` (object): A Cartegraph work order, with every field of the recordset by its field name

**Example output**

```json
{
  "oid": 114964549,
  "work_order": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 114964549,
    "StatusField": "Open",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Delete record

Delete a request, task, work order or asset. This can't be undone.

**Inputs**

- Record type (`record_type`, text, required): Requests, tasks, work orders, or a kind of asset.
- Oid (`oid`, text, required): The record's Oid, Cartegraph's number for it, from a trigger or a search.

**Outputs**

- `deleted` (true/false): Whether it was deleted
- `oid` (number): The record's Oid, Cartegraph's number for it
- `record_type` (text): The record's recordset

**Example output**

```json
{
  "deleted": true,
  "oid": 242283165,
  "record_type": "cgTasksClass"
}
```

### Get asset

Get an asset with all its fields.

**Inputs**

- Kind of asset (`asset_type`, text, required): The kind of asset, such as Signs.
- Oid (`oid`, text, required): The asset's Oid, Cartegraph's number for it, from a trigger or a search.

**Outputs**

- `asset` (object): A Cartegraph asset, with every field of its recordset by its field name
- `asset_type` (text): The asset's recordset

**Example output**

```json
{
  "asset": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "Sign-50",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 435560664,
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  },
  "asset_type": "cgSignsClass"
}
```

### Get current user

Get the Cartegraph user the connection signs in as, and their security role.

**Inputs**: None.

**Outputs**

- `email` (text): Email address
- `first_name` (text): First name
- `last_name` (text): Last name
- `role` (text): Security role
- `user_name` (text): The user name

**Example output**

```json
{
  "email": "druiz@example.gov",
  "first_name": "Dana",
  "last_name": "Ruiz",
  "role": "Field Crew",
  "user_name": "publicworks"
}
```

### Get request

Get a request with all its fields.

**Inputs**

- Oid (`oid`, text, required): The request's Oid, Cartegraph's number for it, from a trigger or a search.

**Outputs**

- `request` (object): A Cartegraph request, with every field of the recordset by its field name

**Example output**

```json
{
  "request": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 1495227176,
    "StatusField": "Open",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Get task

Get a task with all its fields.

**Inputs**

- Oid (`oid`, text, required): The task's Oid, Cartegraph's number for it, from a trigger or a search.

**Outputs**

- `task` (object): A Cartegraph task, with every field of the recordset by its field name

**Example output**

```json
{
  "task": {
    "ActivityField": "Patch",
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 242283165,
    "StatusField": "Planned",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Get work order

Get a work order with all its fields.

**Inputs**

- Oid (`oid`, text, required): The work order's Oid, Cartegraph's number for it, from a trigger or a search.

**Outputs**

- `work_order` (object): A Cartegraph work order, with every field of the recordset by its field name

**Example output**

```json
{
  "work_order": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 114964549,
    "StatusField": "Open",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### List asset tasks

List the tasks on an asset, newest first.

**Inputs**

- Kind of asset (`asset_type`, text, required): The kind of asset, such as Signs.
- Oid (`oid`, text, required): The asset's Oid, Cartegraph's number for it, from a trigger or a search.
- Most results (`limit`, number): How many to return at most, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `asset_type` (text): The asset's recordset
- `count` (number): How many are listed
- `oid` (number): The record's Oid, Cartegraph's number for it
- `tasks` (list): The asset's tasks, newest first

**Example output**

```json
{
  "asset_type": "cgSignsClass",
  "count": 1,
  "oid": 435560664,
  "tasks": [
    {
      "ActivityField": "Patch",
      "EnteredByField": "Public Works Clerk",
      "EntryDateField": "2026-10-30T09:12:44-05:00",
      "IDField": "2219",
      "InactiveField": false,
      "LastModifiedByField": "Public Works Clerk",
      "NotesField": "Reported by a resident",
      "Oid": 242283165,
      "StatusField": "Planned",
      "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
    }
  ]
}
```

### List asset types

List the kinds of asset the site keeps, such as Signs and Storm Inlets.

**Inputs**: None.

**Outputs**

- `asset_types` (list): The kinds of asset
- `count` (number): How many are listed

**Example output**

```json
{
  "asset_types": [
    {
      "class_name": "cgSignsClass",
      "name": "Signs"
    }
  ],
  "count": 1
}
```

### List attachments

List the files attached to a request, task, work order or asset.

**Inputs**

- Record type (`record_type`, text, required): Requests, tasks, work orders, or a kind of asset.
- Oid (`oid`, text, required): The record's Oid, Cartegraph's number for it, from a trigger or a search.

**Outputs**

- `attachments` (list): The attachments
- `count` (number): How many are listed
- `oid` (number): The record's Oid, Cartegraph's number for it
- `record_type` (text): The record's recordset

**Example output**

```json
{
  "attachments": [
    {
      "description": "",
      "entered": "2026-10-30T09:20:00-05:00",
      "entered_by": "Public Works Clerk",
      "file_name": "pothole.jpg",
      "oid": 1495227177
    }
  ],
  "count": 1,
  "oid": 1495227176,
  "record_type": "cgRequestsClass"
}
```

### List field values

List the values a field can take, such as every task status or activity.

**Inputs**

- Record type (`record_type`, text, required): Requests, tasks, work orders, or a kind of asset.
- Field (`field`, text, required): The field, such as Status. Only fields with a list of values are offered.

**Outputs**

- `count` (number): How many are listed
- `field` (text): The field
- `record_type` (text): The recordset
- `values` (list): The values, in order

**Example output**

```json
{
  "count": 3,
  "field": "StatusField",
  "record_type": "cgTasksClass",
  "values": [
    "Planned",
    "In Progress",
    "Completed"
  ]
}
```

### List fields

List the fields of requests, tasks, work orders or a kind of asset, with their names.

**Inputs**

- Record type (`record_type`, text, required): Requests, tasks, work orders, or a kind of asset.

**Outputs**

- `count` (number): How many are listed
- `fields` (list): Its fields
- `name` (text): Its name, such as Tasks
- `record_type` (text): The recordset

**Example output**

```json
{
  "count": 1,
  "fields": [
    {
      "label": "Activity",
      "lookup": "cgActivitiesClass",
      "name": "ActivityField",
      "read_only": false,
      "required": true,
      "unit": ""
    }
  ],
  "name": "Tasks",
  "record_type": "cgTasksClass"
}
```

### Search assets

Find assets of a kind by ID or a Cartegraph filter, newest first.

**Inputs**

- Kind of asset (`asset_type`, text, required): The kind of asset, such as Signs.
- ID (`record_id`, text): Only the record with this ID, as people see it, such as 2219.
- Filter (`filter_expression`, text): Cartegraph's own filter, for anything else, such as ([Priority] is equal to "High").
- Most results (`limit`, number): How many to return at most, 1 to 1000. Defaults to 100. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to page through more results. At least 0.

**Outputs**

- `asset_type` (text): The assets' recordset
- `assets` (list): The matching assets, newest first
- `count` (number): How many are listed
- `total` (number): How many match in all

**Example output**

```json
{
  "asset_type": "cgSignsClass",
  "assets": [
    {
      "EnteredByField": "Public Works Clerk",
      "EntryDateField": "2026-10-30T09:12:44-05:00",
      "IDField": "Sign-50",
      "InactiveField": false,
      "LastModifiedByField": "Public Works Clerk",
      "NotesField": "Reported by a resident",
      "Oid": 435560664,
      "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
    }
  ],
  "count": 1,
  "total": 1
}
```

### Search requests

Find requests by status, ID or a Cartegraph filter, newest first.

**Inputs**

- Status (`status`, text): Only records with this status.
- ID (`record_id`, text): Only the record with this ID, as people see it, such as 2219.
- Filter (`filter_expression`, text): Cartegraph's own filter, for anything else, such as ([Priority] is equal to "High").
- Most results (`limit`, number): How many to return at most, 1 to 1000. Defaults to 100. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to page through more results. At least 0.

**Outputs**

- `count` (number): How many are listed
- `requests` (list): The matching requests, newest first
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "requests": [
    {
      "EnteredByField": "Public Works Clerk",
      "EntryDateField": "2026-10-30T09:12:44-05:00",
      "IDField": "2219",
      "InactiveField": false,
      "LastModifiedByField": "Public Works Clerk",
      "NotesField": "Reported by a resident",
      "Oid": 1495227176,
      "StatusField": "Open",
      "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
    }
  ],
  "total": 1
}
```

### Search tasks

Find tasks by status, ID or a Cartegraph filter, newest first.

**Inputs**

- Status (`status`, text): Only records with this status.
- ID (`record_id`, text): Only the record with this ID, as people see it, such as 2219.
- Filter (`filter_expression`, text): Cartegraph's own filter, for anything else, such as ([Priority] is equal to "High").
- Most results (`limit`, number): How many to return at most, 1 to 1000. Defaults to 100. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to page through more results. At least 0.

**Outputs**

- `count` (number): How many are listed
- `tasks` (list): The matching tasks, newest first
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "tasks": [
    {
      "ActivityField": "Patch",
      "EnteredByField": "Public Works Clerk",
      "EntryDateField": "2026-10-30T09:12:44-05:00",
      "IDField": "2219",
      "InactiveField": false,
      "LastModifiedByField": "Public Works Clerk",
      "NotesField": "Reported by a resident",
      "Oid": 242283165,
      "StatusField": "Planned",
      "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
    }
  ],
  "total": 1
}
```

### Search work orders

Find work orders by status, ID or a Cartegraph filter, newest first.

**Inputs**

- Status (`status`, text): Only records with this status.
- ID (`record_id`, text): Only the record with this ID, as people see it, such as 2219.
- Filter (`filter_expression`, text): Cartegraph's own filter, for anything else, such as ([Priority] is equal to "High").
- Most results (`limit`, number): How many to return at most, 1 to 1000. Defaults to 100. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to page through more results. At least 0.

**Outputs**

- `count` (number): How many are listed
- `total` (number): How many match in all
- `work_orders` (list): The matching work orders, newest first

**Example output**

```json
{
  "count": 1,
  "total": 1,
  "work_orders": [
    {
      "EnteredByField": "Public Works Clerk",
      "EntryDateField": "2026-10-30T09:12:44-05:00",
      "IDField": "2219",
      "InactiveField": false,
      "LastModifiedByField": "Public Works Clerk",
      "NotesField": "Reported by a resident",
      "Oid": 114964549,
      "StatusField": "Open",
      "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
    }
  ]
}
```

### Update asset

Change an asset's field values. Fields left out are not changed.

**Inputs**

- Kind of asset (`asset_type`, text, required): The kind of asset, such as Signs.
- Oid (`oid`, text, required): The asset's Oid, Cartegraph's number for it, from a trigger or a search.
- Fields (`fields`, object, required): The asset's field values, by field. Fields left out are not changed.

**Outputs**

- `asset` (object): A Cartegraph asset, with every field of its recordset by its field name
- `asset_type` (text): The asset's recordset

**Example output**

```json
{
  "asset": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "Sign-50",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 435560664,
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  },
  "asset_type": "cgSignsClass"
}
```

### Update request

Change a request's field values. Fields left out are not changed.

**Inputs**

- Oid (`oid`, text, required): The request's Oid, Cartegraph's number for it, from a trigger or a search.
- Fields (`fields`, object, required): The request's field values, by field. Fields left out are not changed.

**Outputs**

- `request` (object): A Cartegraph request, with every field of the recordset by its field name

**Example output**

```json
{
  "request": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 1495227176,
    "StatusField": "Open",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Update task

Change a task's field values. Fields left out are not changed.

**Inputs**

- Oid (`oid`, text, required): The task's Oid, Cartegraph's number for it, from a trigger or a search.
- Fields (`fields`, object, required): The task's field values, by field. Fields left out are not changed.

**Outputs**

- `task` (object): A Cartegraph task, with every field of the recordset by its field name

**Example output**

```json
{
  "task": {
    "ActivityField": "Patch",
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 242283165,
    "StatusField": "Planned",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```

### Update work order

Change a work order's field values. Fields left out are not changed.

**Inputs**

- Oid (`oid`, text, required): The work order's Oid, Cartegraph's number for it, from a trigger or a search.
- Fields (`fields`, object, required): The work order's field values, by field. Fields left out are not changed.

**Outputs**

- `work_order` (object): A Cartegraph work order, with every field of the recordset by its field name

**Example output**

```json
{
  "work_order": {
    "EnteredByField": "Public Works Clerk",
    "EntryDateField": "2026-10-30T09:12:44-05:00",
    "IDField": "2219",
    "InactiveField": false,
    "LastModifiedByField": "Public Works Clerk",
    "NotesField": "Reported by a resident",
    "Oid": 114964549,
    "StatusField": "Open",
    "cgLastModifiedField": "2026-10-30T09:12:44-05:00"
  }
}
```
