# How do I cache data with Embedded Cloud?

**URL:** <https://community.cdata.com/t/how-do-i-cache-data-with-embedded-cloud/1262>\
**Category:** CData Connect AI Embed\
**Tags:** developer, embed-cloud, question, embedded-cloud, job-api, data-caching, data-cache, oem\
**Created:** [January 14, 2026, 9:39pm UTC](https://community.cdata.com/t/how-do-i-cache-data-with-embedded-cloud/1262 "2026-01-14T21:39:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_T](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/james_t/32/1871_2.png) [@James\_T](https://community.cdata.com/u/James_T)\
**Post date:** [January 14, 2026, 9:39pm UTC](https://community.cdata.com/t/how-do-i-cache-data-with-embedded-cloud/1262/1 "2026-01-14T21:39:24Z")

</div>

Do you have some step-by-step&nbsp;instructions for creating & using a data cache with Embedded Cloud’s Job API?

---

<div class="post-metadata">

**Author:** ![James\_T](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/james_t/32/1871_2.png) [@James\_T](https://community.cdata.com/u/James_T)\
**Post date:** [January 14, 2026, 10:29pm UTC](https://community.cdata.com/t/how-do-i-cache-data-with-embedded-cloud/1262/2 "2026-01-14T22:29:02Z")

</div>

## JOB API

To use Embedded Cloud’s Job API to cache data, a PostgreSQL database will be needed. The cache database can provided by your end-user OR hosted within your application’s environment.

Note: all requests to Embedded Cloud APIs use Jason Web Tokens (JWT). Requests to the Job API require that&nbsp;a sub-account id is included in the JWT payload.

## 1. Create cache connection (PostgreSQL)

### **Option 1: End user provides&nbsp;database**

Creates a re-direct URL similar to the Connection API.

**Prerequisite:** The end-user has a publicly available PostgreSQL database with appropriate permissions.

A dedicated database or schema is recommended for best performance.

**Request**

POST [https://cloud.cdata.com/api/job/cacheConnection/formLink](https://cloud.cdata.com/api/job/cacheConnection/formLink)

`{ "redirectURL": "https://www.google.com" }`

**Response**

A string containing the URL to redirect the user to. Users can then add their PostgreSQL connection information to this page.

HTTP 200 OK

`{ "redirectURL": "https://cloud.cdata.com/oem/user/cacheConnection?token=[token value]&driver=PostgreSQL&redirectUrl=https%3A%2F%2Fwww.google.com&connectionName=OEMCacheConnection" }`

### **Option 2: OEM Account provides&nbsp;database**

Create/update the cache connection to OEM provided database using connection string.

**Prerequisite:** &nbsp;You have a PostgreSQL database with appropriate permissions.

_To ensure multi-tenancy is preserved, separate databases OR schemas per sub-account should be used_. Using the CData sub-account ID OR related externalID as the name of the database or schema is recommended.

**Request**

POST [https://cloud.cdata.com/api/job/cacheConnection](https://cloud.cdata.com/api/job/cacheConnection)

`{ "connectionString": "Server=<Server URL>;Port=5432;User=<Your User Name>;Password=<Your Password>;Database=<Database Name>;BrowsableSchema=<Schema Name>" }`

## 2. Create Cache Job

1. Obtain the connectionConnection id & sourceName (aka catalog) via the [Connection API](https://cloud.cdata.com/docs/Connection-API.html) (List Connections).
2. Obtain the sourceSchema & sourceTable via the [Metadata API](https://cloud.cdata.com/docs/Metadata-API.html).

**Request**

POST `https://cloud.cdata.com/api/job/create`

`{ "jobType": "Caching", "intervalUnit": "Hour", "intervalValue": "1", "logVerbosity": "1", "enabled": "true", "params": { "timeCheckColumn": "", "autoTruncateStrings": "false", "sourceConnection": "36b2c04f-70f4-44a1-876a-29e42237ee63", "sourceName": "OData1", "sourceSchema": "OData", "sourceTable": "Categories" } } `

**Payload Parameters**

| **Name** | **Description** |
| --- | --- |
| jobType | The type of job that the user wants to run (Caching or ScheduledQuery). |
| intervalUnit | A string representing the time interval (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected frequency unit the job should wait before running again. |
| logVerbosity | An enum indicating the level of log verbosity (1-5). |
| enabled | A Boolean value indicating whether the job is enabled. The default value is true. |
| definedNextRun | An optional DateTime value that can be used to set the initial start time for the job. |
| params | An object containing job parameters. See example below. |

**Response**

HTTP 200 OK

`{ "jobs": [/*job information shown below*/] } `

| **Name** | **Description** |
| --- | --- |
| id | The job’s Id. |
| name | The job’s name. |
| enabled | A Boolean value indicating whether the job is enabled. |
| created | The date and time the job was created. |
| lastModified | The date and time the job was last modified. |
| nextRunTime | The date and time the job is scheduled to be run next. |
| intervalUnit | A string representing the interval unit for the job (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected interval unit the job should wait before running again. |
| logVerbosity | A number indicating the level of log verbosity (1-5), with 5 being the highest. For normal operation & best performance, levels 1 or 2 is recommended. |
| lastRun | The last run metrics for the job, including the date and time, duration, status, rows affected, and next run time. See example in documentation. |
| params | An object containing job parameters. See example in documentation. |

### 3. List Jobs

After you have created the Cache Job, you can sent a request to the List Jobs endpoint to return information about all Jobs for a sub-account.

Request&nbsp;`GET https://cloud.cdata.com/api/job/list`

Additional information, examples and endpoints (Describe Job, Update Job, Delete Job, Run Job & Stop Job) are&nbsp;available in the Embedded Cloud documentation:&nbsp;[https://cloud.cdata.com/docs/Job-API.html](https://cloud.cdata.com/docs/Job-API.html)
