> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: ObjectRef

> TypeScript SDK reference

[weave](../) / ObjectRef

Represents a reference to a saved Weave object.

Generally, end users will not need to interact with this class directly.

An ObjectRef contains the project ID, object ID, and digest that uniquely identify
a saved object in Weave's storage system.

`Example`

```ts theme={null}
const ref = new ObjectRef('my-project', 'abc123', 'def456');
const uri = ref.uri(); // weave:///my-project/object/abc123:def456
```

## Table of contents

### Constructors

* [constructor](./objectref#constructor)

### Properties

* [digest](./objectref#digest)
* [objectId](./objectref#objectid)
* [projectId](./objectref#projectid)

### Methods

* [get](./objectref#get)
* [ui\_url](./objectref#ui_url)
* [uri](./objectref#uri)
* [fromUri](./objectref#fromuri)

## Constructors

### constructor

• **new ObjectRef**(`projectId`, `objectId`, `digest`): [`ObjectRef`](./objectref)

#### Parameters

| Name        | Type     |
| :---------- | :------- |
| `projectId` | `string` |
| `objectId`  | `string` |
| `digest`    | `string` |

#### Returns

[`ObjectRef`](./objectref)

#### Defined in

[weaveObject.ts:26](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L26)

## Properties

### digest

• **digest**: `string`

#### Defined in

[weaveObject.ts:29](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L29)

***

### objectId

• **objectId**: `string`

#### Defined in

[weaveObject.ts:28](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L28)

***

### projectId

• **projectId**: `string`

#### Defined in

[weaveObject.ts:27](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L27)

## Methods

### get

▸ **get**(): `Promise`\<`any`>

#### Returns

`Promise`\<`any`>

#### Defined in

[weaveObject.ts:66](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L66)

***

### ui\_url

▸ **ui\_url**(): `string`

#### Returns

`string`

#### Defined in

[weaveObject.ts:61](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L61)

***

### uri

▸ **uri**(): `string`

#### Returns

`string`

#### Defined in

[weaveObject.ts:57](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L57)

***

### fromUri

▸ **fromUri**(`uri`): [`ObjectRef`](./objectref)

Creates an ObjectRef from a Weave URI string.

#### Parameters

| Name  | Type     | Description                                                           |
| :---- | :------- | :-------------------------------------------------------------------- |
| `uri` | `string` | A Weave URI in the format: weave:///entity/project/object/name:digest |

#### Returns

[`ObjectRef`](./objectref)

A new ObjectRef instance

`Throws`

Error if the URI format is invalid or not an object ref

`Example`

```ts theme={null}
const ref = ObjectRef.fromUri('weave:///my-entity/my-project/object/my-dataset:abc123');
```

#### Defined in

[weaveObject.ts:44](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/weaveObject.ts#L44)
