---
title: Access data objects using scripts
description: IDM's uniform programming model means that all objects are queried and manipulated in the same way, using the Resource API. The URL or URI that is used to identify the target object for an operation depends on the object type. For more information about scripts and the objects available to scripts, refer to Scripting.
component: pingidm
version: 8.1
page_id: pingidm:objects-guide:data-scripts
canonical_url: https://docs.pingidentity.com/pingidm/8.1/objects-guide/data-scripts.html
keywords: ["Data Object Model", "Scripts"]
---

# Access data objects using scripts

IDM's uniform programming model means that all objects are queried and manipulated in the same way, using the Resource API. The URL or URI that is used to identify the target object for an operation depends on the [object type](appendix-objects.html). For more information about scripts and the objects available to scripts, refer to [Scripting](../scripting-guide/preface.html).

You can use the Resource API to obtain managed, system, configuration, and repository objects, as follows:

```javascript
val = openidm.read("managed/organization/mysampleorg")
val = openidm.read("system/mysystem/account")
val = openidm.read("config/custom/mylookuptable")
val = openidm.read("repo/custom/mylookuptable")
```

For information about constructing an object ID, refer to [URI Scheme](../rest-api-reference/rest-structure.html#rest-uri-scheme).

You can update entire objects with the `update()` function, as follows:

```javascript
openidm.update("managed/organization/mysampleorg", rev, object)
openidm.update("system/mysystem/account", rev, object)
```

You can apply a partial update to a managed or system object by using the `patch()` function:

```javascript
openidm.patch("managed/organization/mysampleorg", rev, value)
```

The `create()`, `delete()`, and `query()` functions work the same way.
