> For the complete documentation index, see [llms.txt](https://wpcloudplugins.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wpcloudplugins.gitbook.io/docs/developers/api/get_entry.md).

# get\_entry()

## Get MetaData for file/folder

&#x20; <mark style="background-color:orange;">get\_entry()</mark> &#x20;

This method will set the account to be used for other API calls.

{% tabs %}
{% tab title="OneDrive" %}

### **Parameters**

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| `$id` | string | File / Folder ID |

### **Return**

| Name    | Type           | Description                                         |
| ------- | -------------- | --------------------------------------------------- |
| `$node` | **CachedNode** | The cached object for the requested file or folder. |

### **Usage**

```php
WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575');
WPCP_ONEDRIVE_API::set_drive_by_id('b!DlaHWskCed_MIid3KpJH5Lbatf9HsdXBAZH5YcvPAbMhJUKzTJyzgvXZYpBS');

$node = WPCP_ONEDRIVE_API::get_entry('01EXLSWHWMQZNDMLRG7NFIWAVYCFJAXP2R');

$node->get_name();
```

{% endtab %}

{% tab title="Google Drive" %}

### **Parameters**

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| `$id` | string | File / Folder ID |

### **Return**

| Name    | Type           | Description                                         |
| ------- | -------------- | --------------------------------------------------- |
| `$node` | **CachedNode** | The cached object for the requested file or folder. |

### **Usage**

```php
WPCP_GDRIVE_API::set_account_by_id('201096615285735764133')

$node = WPCP_GDRIVE_API::get_entry('1wzWlDMsZkA4N5yEEAmMigp52u7M0Lk_7');

$node->get_name();
```

{% endtab %}

{% tab title="Dropbox" %}

### **Parameters**

| Name  | Type   | Description                                                                        |
| ----- | ------ | ---------------------------------------------------------------------------------- |
| `$id` | string | File / Folder ID or absolute path for file or folder. A path should start with '/' |

### **Return**

| Name     | Type      | Description                                  |
| -------- | --------- | -------------------------------------------- |
| `$entry` | **Entry** | The object for the requested file or folder. |

### **Usage**

```php
WPCP_DROPBOX_API::set_account_by_id('dbid:AADSy6JxzbgqCs4A43CAAAfO9xvZwpcsLU');

$entry = WPCP_DROPBOX_API::get_entry('/path/to/file.jpg');

$entry->get_name();
```

{% endtab %}

{% tab title="Box" %}

### **Parameters**

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| `$id` | string | File / Folder ID |

### **Return**

| Name    | Type           | Description                                         |
| ------- | -------------- | --------------------------------------------------- |
| `$node` | **CachedNode** | The cached object for the requested file or folder. |

### **Usage**

```php
WPCP_BOX_API::set_account_by_id('29232154182');

$node = WPCP_BOX_API::get_entry('511426721354');

$node->get_name();
```

{% endtab %}
{% endtabs %}
