Legacy Data Integration API Reference (1.0.0) - SubRiversManagement
Sub Rivers Management. Create / Read / Update / Delete Sub-Rivers values. Each value is validated and checked by the correlated key name of the column. Invalid key names will throw an error.
Get sub river per river
Authorizations:
path Parameters
| riverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
Responses
Response Schema: application/json
| _id | string The sub river id |
| name | string The sub river name |
| description | string A sub river description |
| cross_id | string (CrossIdSchema) Cross ID is a referenced ID which crosses between environment and accounts. In this case, the id can be stay the same, but reference between environments and accounts in rivers/connections/logic rivers, etc... |
| master_river_id | string (RiverIdSchema) The river cross id which the sub river is refered to. Every sub river can be reference only one river id. |
| account | string (AccountSchema) Data Integration account id. |
| env_id | string (EnvIdSchema) The object's environment id. |
| date_updated | string <date-time> (UpdateDatesSchema) The date for insert/update of the entity. |
| date_inserted | string <date-time> (UpdateDatesSchema) The date for insert/update of the entity. |
| updated_by | string (UpdateBySchema) The user Id in Data Integration updated the entity |
| source | object (SourceSubRiverSchema) The source parameters wanted to be set in the sub river. For the specifications of the allowed source parameters, please go to Properties section in this API. |
| target | object (TargetSubRiverSchema) The target parameters wanted to be set in the sub river. For the specifications of the allowed target parameters, please go to Properties section in this API. |
| is_scheduled | boolean A flag indicated if the sub river is scheduled. |
object (ScheduleSchema) The schedule definition for the sub river, in quartz with 0 seconds required | |
| inherit_schedule | boolean A flag indicates if the sub river inherits its schedule properties from the river. |
| is_enabled | boolean A flag indicates if the sub river is in active state or not |
Request samples
- cURL
- Python
curl --location -g --request GET 'https://console.rivery.io/api/rivers/{{riverId}}/sub_rivers' \ --header 'Authorization: Bearer <token>'
Response samples
- 200
{- "_id": "5faa7bd17bedeb66f4c287c7",
- "name": "My Subriver",
- "description": "My Facebook clients sub river",
- "cross_id": "5faa7bd17bedeb66f4c287c7",
- "master_river_id": "5faa76e31e78e0001d61d7cf",
- "account": "56643e6770ec07e624d43351",
- "env_id": "56643e6770ec07e624d43574",
- "date_updated": "2020-01-04T12:45:34.234Z",
- "date_inserted": "2020-01-04T12:45:34.234Z",
- "updated_by": "58b820a0c762711d8c2f60c7",
- "source": {
- "date_range": {
- "start_date": "2020-10-10T12:23:34.123Z",
- "end_date": "2020-10-11T12:34:45.123Z",
- "days_back": 5,
- "time_period": "custom"
}, - "report": "campaigns",
- "connection_id": "5fa7c995f5as82c6crfb9dd565"
}, - "target": {
- "table_name": "ods_klaviyo_campaigns",
- "schema_name": "public"
}, - "is_scheduled": true,
- "schedule": {
- "cron": "* 15 1/2 * * *"
}, - "inherit_schedule": true,
- "is_enabled": false
}Create new sub river for river
Authorizations:
path Parameters
| riverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
Request Body schema: application/jsonrequired
An Array of sub rivers to create or update.
Array of objects (SubRiverSchema) | |||||||||||||||||
Array
| |||||||||||||||||
Responses
Response Schema: application/json
| _id | string The sub river id |
| name | string The sub river name |
| description | string A sub river description |
| cross_id | string (CrossIdSchema) Cross ID is a referenced ID which crosses between environment and accounts. In this case, the id can be stay the same, but reference between environments and accounts in rivers/connections/logic rivers, etc... |
| master_river_id | string (RiverIdSchema) The river cross id which the sub river is refered to. Every sub river can be reference only one river id. |
| account | string (AccountSchema) Data Integration account id. |
| env_id | string (EnvIdSchema) The object's environment id. |
| date_updated | string <date-time> (UpdateDatesSchema) The date for insert/update of the entity. |
| date_inserted | string <date-time> (UpdateDatesSchema) The date for insert/update of the entity. |
| updated_by | string (UpdateBySchema) The user Id in Data Integration updated the entity |
| source | object (SourceSubRiverSchema) The source parameters wanted to be set in the sub river. For the specifications of the allowed source parameters, please go to Properties section in this API. |
| target | object (TargetSubRiverSchema) The target parameters wanted to be set in the sub river. For the specifications of the allowed target parameters, please go to Properties section in this API. |
| is_scheduled | boolean A flag indicated if the sub river is scheduled. |
object (ScheduleSchema) The schedule definition for the sub river, in quartz with 0 seconds required | |
| inherit_schedule | boolean A flag indicates if the sub river inherits its schedule properties from the river. |
| is_enabled | boolean A flag indicates if the sub river is in active state or not |
Request samples
- Payload
- cURL
- Python
{- "sub_rivers": [
- {
- "name": "My Subriver",
- "description": "My Facebook clients sub river",
- "source": {
- "date_range": {
- "start_date": "2020-10-10T12:23:34.123Z",
- "end_date": "2020-10-11T12:34:45.123Z",
- "days_back": 5,
- "time_period": "custom"
}, - "report": "campaigns",
- "connection_id": "5fa7c995f5as82c6crfb9dd565"
}, - "target": {
- "table_name": "ods_klaviyo_campaigns",
- "schema_name": "public"
}, - "is_scheduled": true,
- "schedule": {
- "cron": "* 15 1/2 * * *"
}, - "inherit_schedule": true,
- "is_enabled": false
}
]
}Response samples
- 200
{- "_id": "5faa7bd17bedeb66f4c287c7",
- "name": "My Subriver",
- "description": "My Facebook clients sub river",
- "cross_id": "5faa7bd17bedeb66f4c287c7",
- "master_river_id": "5faa76e31e78e0001d61d7cf",
- "account": "56643e6770ec07e624d43351",
- "env_id": "56643e6770ec07e624d43574",
- "date_updated": "2020-01-04T12:45:34.234Z",
- "date_inserted": "2020-01-04T12:45:34.234Z",
- "updated_by": "58b820a0c762711d8c2f60c7",
- "source": {
- "date_range": {
- "start_date": "2020-10-10T12:23:34.123Z",
- "end_date": "2020-10-11T12:34:45.123Z",
- "days_back": 5,
- "time_period": "custom"
}, - "report": "campaigns",
- "connection_id": "5fa7c995f5as82c6crfb9dd565"
}, - "target": {
- "table_name": "ods_klaviyo_campaigns",
- "schema_name": "public"
}, - "is_scheduled": true,
- "schedule": {
- "cron": "* 15 1/2 * * *"
}, - "inherit_schedule": true,
- "is_enabled": false
}Get data from specific sub river id
Authorizations:
path Parameters
| riverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
| subRiverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
Responses
Response Schema: application/json
| _id | string The sub river id |
| name | string The sub river name |
| description | string A sub river description |
| cross_id | string (CrossIdSchema) Cross ID is a referenced ID which crosses between environment and accounts. In this case, the id can be stay the same, but reference between environments and accounts in rivers/connections/logic rivers, etc... |
| master_river_id | string (RiverIdSchema) The river cross id which the sub river is refered to. Every sub river can be reference only one river id. |
| account | string (AccountSchema) Data Integration account id. |
| env_id | string (EnvIdSchema) The object's environment id. |
| date_updated | string <date-time> (UpdateDatesSchema) The date for insert/update of the entity. |
| date_inserted | string <date-time> (UpdateDatesSchema) The date for insert/update of the entity. |
| updated_by | string (UpdateBySchema) The user Id in Data Integration updated the entity |
| source | object (SourceSubRiverSchema) The source parameters wanted to be set in the sub river. For the specifications of the allowed source parameters, please go to Properties section in this API. |
| target | object (TargetSubRiverSchema) The target parameters wanted to be set in the sub river. For the specifications of the allowed target parameters, please go to Properties section in this API. |
| is_scheduled | boolean A flag indicated if the sub river is scheduled. |
object (ScheduleSchema) The schedule definition for the sub river, in quartz with 0 seconds required | |
| inherit_schedule | boolean A flag indicates if the sub river inherits its schedule properties from the river. |
| is_enabled | boolean A flag indicates if the sub river is in active state or not |
Request samples
- cURL
- Python
curl --location -g --request GET 'https://console.rivery.io/api/rivers/{{riverId}}/sub_rivers/{{subRiverId}}' \ --header 'Authorization: Bearer <token>'
Response samples
- 200
- 404
- 429
{- "_id": "5faa7bd17bedeb66f4c287c7",
- "name": "My Subriver",
- "description": "My Facebook clients sub river",
- "cross_id": "5faa7bd17bedeb66f4c287c7",
- "master_river_id": "5faa76e31e78e0001d61d7cf",
- "account": "56643e6770ec07e624d43351",
- "env_id": "56643e6770ec07e624d43574",
- "date_updated": "2020-01-04T12:45:34.234Z",
- "date_inserted": "2020-01-04T12:45:34.234Z",
- "updated_by": "58b820a0c762711d8c2f60c7",
- "source": {
- "date_range": {
- "start_date": "2020-10-10T12:23:34.123Z",
- "end_date": "2020-10-11T12:34:45.123Z",
- "days_back": 5,
- "time_period": "custom"
}, - "report": "campaigns",
- "connection_id": "5fa7c995f5as82c6crfb9dd565"
}, - "target": {
- "table_name": "ods_klaviyo_campaigns",
- "schema_name": "public"
}, - "is_scheduled": true,
- "schedule": {
- "cron": "* 15 1/2 * * *"
}, - "inherit_schedule": true,
- "is_enabled": false
}Update specific sub river by sub river id and river id
Authorizations:
path Parameters
| riverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
| subRiverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
Request Body schema: application/jsonrequired
An Array of sub rivers to create or update.
Array of objects (SubRiverSchema) | |||||||||||||||||
Array
| |||||||||||||||||
Responses
Response Schema: application/json
| message | string |
Request samples
- Payload
- cURL
- Python
{- "sub_rivers": [
- {
- "name": "My Subriver",
- "description": "My Facebook clients sub river",
- "source": {
- "date_range": {
- "start_date": "2020-10-10T12:23:34.123Z",
- "end_date": "2020-10-11T12:34:45.123Z",
- "days_back": 5,
- "time_period": "custom"
}, - "report": "campaigns",
- "connection_id": "5fa7c995f5as82c6crfb9dd565"
}, - "target": {
- "table_name": "ods_klaviyo_campaigns",
- "schema_name": "public"
}, - "is_scheduled": true,
- "schedule": {
- "cron": "* 15 1/2 * * *"
}, - "inherit_schedule": true,
- "is_enabled": false
}
]
}Response samples
- 200
{- "message": "1 subriver had been updated"
}Delete sub river by id
Authorizations:
path Parameters
| riverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
| subRiverId required | string Example: 5faa7bd17bedeb66f4c287c7 The river ID to reference for |
Responses
Response Schema: application/json
| message | string |
Request samples
- cURL
- Python
curl --location -g --request DELETE 'https://console.rivery.io/api/rivers/{{riverId}}/sub_rivers/{{subRiverId}}' \ --header 'Authorization: Bearer <token>'
Response samples
- 200
- 403
- 500
{- "message": "sub river deleted"
}