sites_traffic_splits
Creates, updates, deletes, gets or lists a sites_traffic_splits
resource.
Overview
Name | sites_traffic_splits |
Type | Resource |
Id | netlify.split_test.sites_traffic_splits |
Fields
The following fields are returned by SELECT
queries:
- getSplitTest
- getSplitTests
split_test
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
site_id | string | |
active | boolean | |
branches | array | |
created_at | string (dateTime) | |
path | string | |
unpublished_at | string (dateTime) | |
updated_at | string (dateTime) |
split_tests
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
site_id | string | |
active | boolean | |
branches | array | |
created_at | string (dateTime) | |
path | string | |
unpublished_at | string (dateTime) | |
updated_at | string (dateTime) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getSplitTest | select | site_id , split_test_id | ||
getSplitTests | select | site_id | ||
createSplitTest | insert | site_id | ||
updateSplitTest | exec | site_id , split_test_id |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
site_id | string | |
split_test_id | string |
SELECT
examples
- getSplitTest
- getSplitTests
split_test
SELECT
id,
name,
site_id,
active,
branches,
created_at,
path,
unpublished_at,
updated_at
FROM netlify.split_test.sites_traffic_splits
WHERE site_id = '{{ site_id }}' -- required
AND split_test_id = '{{ split_test_id }}' -- required
;
split_tests
SELECT
id,
name,
site_id,
active,
branches,
created_at,
path,
unpublished_at,
updated_at
FROM netlify.split_test.sites_traffic_splits
WHERE site_id = '{{ site_id }}' -- required
;
INSERT
examples
- createSplitTest
- Manifest
No description available.
INSERT INTO netlify.split_test.sites_traffic_splits (
data__branch_tests,
site_id
)
SELECT
'{{ branch_tests }}',
'{{ site_id }}'
RETURNING
id,
name,
site_id,
active,
branches,
created_at,
path,
unpublished_at,
updated_at
;
# Description fields are for documentation purposes
- name: sites_traffic_splits
props:
- name: site_id
value: string
description: Required parameter for the sites_traffic_splits resource.
- name: branch_tests
value: object
Lifecycle Methods
- updateSplitTest
Created
EXEC netlify.split_test.sites_traffic_splits.updateSplitTest
@site_id='{{ site_id }}' --required,
@split_test_id='{{ split_test_id }}' --required
@@json=
'{
"branch_tests": "{{ branch_tests }}"
}'
;