Data Factory Variable API
Introduction
A variable represents a character string that can be used one or more times within a Data Factory job. It's usually used to store sensitive information such as passwords, API keys, etc. that should not be stored in plain text in the job.
The Data Factory Variables API Swagger definition is available on our Product-Live API portal here.
General information
- Rate limit: 50 requests per minute
Create a Variable
Request URL
Path parameters
None
Request parameters
None
Request Headers
Header | Type | Description |
---|---|---|
accept | string | */* |
Content-Type | string | application/json |
X-Api-Key | string | Your account API key |
Request Body
json
{
"key": "string",
"name": "string",
"status": "ACTIVE",
"value": "string",
"secret": true
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Request Example
bash
curl -X 'POST' \
'https://api.product-live.com/v1/data_factory/variables' \
-H 'accept: application/json' \
-H 'X-Api-Key: <REDACTED>' \
-H 'Content-Type: application/json' \
-d '{
"key": "string",
"name": "string",
"status": "ACTIVE",
"value": "string",
"secret": true
}'
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
ts
import { createConfiguration, ServerConfiguration, VariableApi } from '@product-live/api-sdk';
export async function main(): Promise<void> {
const configuration = createConfiguration({
baseServer: new ServerConfiguration(process.env.API_BASE_PATH || '', {}),
authMethods: {
ApiKeyAuthHeader: process.env.API_ACCESS_TOKEN
}
});
const variableApi = new VariableApi(configuration);
const variable = await variableApi.createVariable({
key: 'string',
name: 'string',
status: 'ACTIVE',
value: 'string',
secret: true
});
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Response Example
json
{
"status": "ACTIVE",
"object": "variable",
"id": "126",
"createdAt": "2020-01-01T12:00:00.000Z",
"updatedAt": "2020-01-02T12:00:00.000Z",
"name": "string",
"key": "string",
"value": "",
"secret": true
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Get a Variable by Id
Request URL
Path parameters
Parameter | Type | Description |
---|---|---|
variableId | string | A Variable id |
Request parameters
None
Request Headers
Header | Type | Description |
---|---|---|
accept | string | */* |
X-Api-Key | string | Your account API key |
Request Body
None
Request Example
bash
curl -X 'GET' \
'https://api.product-live.com/v1/data_factory/variables/3568538' \
-H 'accept: application/json' \
-H 'X-Api-Key: <REDACTED>'
1
2
3
4
2
3
4
ts
import { createConfiguration, ServerConfiguration, VariableApi } from '@product-live/api-sdk';
export async function main(): Promise<void> {
const configuration = createConfiguration({
baseServer: new ServerConfiguration(process.env.API_BASE_PATH || '', {}),
authMethods: {
ApiKeyAuthHeader: process.env.API_ACCESS_TOKEN
}
});
const variableApi = new VariableApi(configuration);
const variable = await variableApi.getVariableById('variable id');
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Response Example
json
{
"status": "ACTIVE",
"object": "variable",
"id": "<REDACTED>",
"createdAt": "2020-01-01T12:00:00.000Z",
"updatedAt": "2020-01-02T12:00:00.000Z",
"name": "string",
"key": "string",
"value": "<REDACTED>",
"secret": true
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
:::
List Variables
Request URL
Path parameters
None
Request parameters
Parameter | Type | Description |
---|---|---|
page | integer | Optional The page number to retrieve. Default value if missing : 0 |
size | integer | Optional The number of items per page. Default value if missing : 10 |
Request Headers
Header | Type | Description |
---|---|---|
accept | string | */* |
X-Api-Key | string | Your account API key |
Request Body
None
Request Example
bash
curl -X 'GET' \
'https://api.product-live.com/v1/data_factory/variables?size=10&page=0' \
-H 'accept: application/json' \
-H 'X-Api-Key: <REDACTED>'
1
2
3
4
2
3
4
ts
import { createConfiguration, ServerConfiguration, VariableApi } from '@product-live/api-sdk';
export async function main(): Promise<void> {
const configuration = createConfiguration({
baseServer: new ServerConfiguration(process.env.API_BASE_PATH || '', {}),
authMethods: {
ApiKeyAuthHeader: process.env.API_ACCESS_TOKEN
}
});
const variableApi = new VariableApi(configuration);
const variables = await variableApi.getVariables();
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Response Example
json
{
"object": "list",
"data": [
{
"status": "ACTIVE",
"object": "variable",
"id": "6386369739",
"createdAt": "2020-01-01T12:00:00.000Z",
"updatedAt": "2020-01-02T12:00:00.000Z",
"name": "FTP_host",
"key": "FTP_HOST",
"value": "[<REDACTED>](ftp://myhost.com)",
"secret": false
}
],
"totalElements": 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Find Variables
Request URL
Path parameters
None
Request parameters
Parameter | Type | Description |
---|---|---|
page | integer | Optional The page number to retrieve. Default value if missing : 0 |
size | integer | Optional The number of items per page. Default value if missing : 10 |
Request Headers
Header | Type | Value |
---|---|---|
accept | string | */* |
Content-Type | string | application/json |
X-Api-Key | string | Your account API key |
Request Body
See more details on the find request body in the dedicated page Find request.
json
{
"type": "eq",
"caseSensitive": true,
"field": "foo",
"value": "bar"
}
1
2
3
4
5
6
2
3
4
5
6
json
{
"type": "and",
"queries": [
{
"type": "eq",
"caseSensitive": true,
"field": "foo",
"value": "bar"
},
{
"type": "eq",
"caseSensitive": true,
"field": "baz",
"value": "qux"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Request Example
bash
curl -X 'POST' \
'https://api.product-live.com/v1/data_factory/variables/find' \
-H 'accept: application/json' \
-H 'X-Api-Key: [REDACTED]' \
-H 'Content-Type: application/json' \
-d '{
"type": "eq",
"caseSensitive": true,
"field": "foo",
"value": "bar"
}'
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
ts
import { createConfiguration, ServerConfiguration, VariableApi } from '@product-live/api-sdk';
export async function main(): Promise<void> {
const configuration = createConfiguration({
baseServer: new ServerConfiguration(process.env.API_BASE_PATH || '', {}),
authMethods: {
ApiKeyAuthHeader: process.env.API_ACCESS_TOKEN
}
});
const variableApi = new VariableApi(configuration);
const variable = await variableApi.updateVariable('variable id', {
key: 'string',
name: 'string',
status: 'ACTIVE',
value: 'string',
secret: true,
id: 'string'
});
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Response Example
json
{
"status": "ACTIVE",
"object": "variable",
"id": "<REDACTED>",
"createdAt": "2020-01-01T12:00:00.000Z",
"updatedAt": "2020-01-02T12:00:00.000Z",
"name": "string",
"key": "string",
"value": "<REDACTED>",
"secret": true
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Update a Variable
Request URL
Path parameters
Parameter | Type | Description |
---|---|---|
variableId | string | The Variable id |
Request parameters
None
Request Headers
Header | Type | Value |
---|---|---|
accept | string | */* |
Content-Type | string | application/json |
X-Api-Key | string | Your account API key |
Request Body
json
{
"key": "string",
"name": "string",
"status": "ACTIVE",
"value": "string",
"secret": true
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Request Example
bash
curl -X 'PUT' \
'https://api.product-live.com/v1/data_factory/variables/[variable id]' \
-H 'accept: application/json' \
-H 'X-Api-Key: [REDACTED]' \
-H 'Content-Type: application/json' \
-d '{
"key": "string",
"name": "string",
"status": "ACTIVE",
"value": "string",
"secret": true,
"id": "string"
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
ts
import { createConfiguration, ServerConfiguration, VariableApi } from '@product-live/api-sdk';
export async function main(): Promise<void> {
const configuration = createConfiguration({
baseServer: new ServerConfiguration(process.env.API_BASE_PATH || '', {}),
authMethods: {
ApiKeyAuthHeader: process.env.API_ACCESS_TOKEN
}
});
const variableApi = new VariableApi(configuration);
const variable = await variableApi.updateVariable('variable id', {
key: 'string',
name: 'string',
status: 'ACTIVE',
value: 'string',
secret: true,
id: 'string'
});
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Response Example
json
{
"status": "ACTIVE",
"object": "variable",
"id": "<REDACTED>",
"createdAt": "2020-01-01T12:00:00.000Z",
"updatedAt": "2020-01-02T12:00:00.000Z",
"name": "string",
"key": "string",
"value": "<REDACTED>",
"secret": true
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11