Create Data Source

Prev Next
Post
/api/v1/Authoring/data-source

Create a new data source

Security
API Key: x-val-api-token
Header parameter namex-val-api-token

API key needed to access endpoints. Each Validatar user can manage their own set of API keys.

Body parameters

Information about the new data source

Expand All
object
name
string Required

The data source name

Min length1
description
string | null

The data source description

environmentId
integer (int32) Required

The ID of the data source's environment

connection
object (Configuration.Api.Models.v1.DataSourceConnectionAdd) Required
engineId
integer (int32) Required

The data processing engine ID to use for the connection

connectionType
string Required
Valid values[ "SqlServer", "OLEDB", "ODBC", "Snowflake", "PostgreSql", "PythonScript", "SnowflakeEngine" ]
dataSourceTemplateId
integer (int32) | null

The data source template ID to use for the connection

dataAgentGroupId
integer (int32) | null

The data agent group ID to use for the connection

description
string | null

The connection description

configuration

The connection's configuration

OneOf
Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase)
connectionString
string Required

The connection configuration's connection string

Min length1
password
string | null

The connection configuration's password

Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript)
preExecutionScript
string | null

The script to run prior to data source executions

postExecutionScript
string | null

The script to run following data source executions

parameters
Array of object (Configuration.Api.Models.v1.DataSourceConnectionParsedParameter) | null

List of parameters associated with the data source script connection

object
id
integer (int32)

The ID of the parameter

value
string | null

The Value of the parameter

hasSecretValue
boolean

Whether the parameter has a secret value

clearValue
boolean

Whether the parameter should clear its value

resetValue
boolean

Whether the parameter should reset its value

Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake)
databaseName
string Required

The name of the Snowflake database being referenced by the connection

Min length1
schemaName
string | null

The name of the Snowflake schema being referenced by the connection

projectIds
Array of integer | null

The IDs of the projects allowed to use the data source

integer (int32)
permissions
Array of object (Configuration.Api.Models.v1.DataSourcePermission) Required

List of permissions to add to the data source

object
type
string Required
Valid values[ "User", "Group" ]
name
string Required

The permission holder name

Min length1
roleSet
string | null

The name of a predefined role set

roles
Array of string (Configuration.Api.Models.v1.DataSourceRole) | null

The custom roles to use when the roleSet property is empty

string
Valid values[ "ViewMetadata", "CreateTests", "RunTests", "ViewTestResults", "RunProfileSets", "ManagePermissions", "ManageConnections", "ManageDataProfiling", "ExportTestResults" ]
Expand All
object
name
string Required

The data source name

Min length1
description
string | null

The data source description

environmentId
integer (int32) Required

The ID of the data source's environment

connection
object (Configuration.Api.Models.v1.DataSourceConnectionAdd) Required
engineId
integer (int32) Required

The data processing engine ID to use for the connection

connectionType
string Required
Valid values[ "SqlServer", "OLEDB", "ODBC", "Snowflake", "PostgreSql", "PythonScript", "SnowflakeEngine" ]
dataSourceTemplateId
integer (int32) | null

The data source template ID to use for the connection

dataAgentGroupId
integer (int32) | null

The data agent group ID to use for the connection

description
string | null

The connection description

configuration

The connection's configuration

OneOf
Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase)
connectionString
string Required

The connection configuration's connection string

Min length1
password
string | null

The connection configuration's password

Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript)
preExecutionScript
string | null

The script to run prior to data source executions

postExecutionScript
string | null

The script to run following data source executions

parameters
Array of object (Configuration.Api.Models.v1.DataSourceConnectionParsedParameter) | null

List of parameters associated with the data source script connection

object
id
integer (int32)

The ID of the parameter

value
string | null

The Value of the parameter

hasSecretValue
boolean

Whether the parameter has a secret value

clearValue
boolean

Whether the parameter should clear its value

resetValue
boolean

Whether the parameter should reset its value

Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake)
databaseName
string Required

The name of the Snowflake database being referenced by the connection

Min length1
schemaName
string | null

The name of the Snowflake schema being referenced by the connection

projectIds
Array of integer | null

The IDs of the projects allowed to use the data source

integer (int32)
permissions
Array of object (Configuration.Api.Models.v1.DataSourcePermission) Required

List of permissions to add to the data source

object
type
string Required
Valid values[ "User", "Group" ]
name
string Required

The permission holder name

Min length1
roleSet
string | null

The name of a predefined role set

roles
Array of string (Configuration.Api.Models.v1.DataSourceRole) | null

The custom roles to use when the roleSet property is empty

string
Valid values[ "ViewMetadata", "CreateTests", "RunTests", "ViewTestResults", "RunProfileSets", "ManagePermissions", "ManageConnections", "ManageDataProfiling", "ExportTestResults" ]
Expand All
object
name
string Required

The data source name

Min length1
description
string | null

The data source description

environmentId
integer (int32) Required

The ID of the data source's environment

connection
object (Configuration.Api.Models.v1.DataSourceConnectionAdd) Required
engineId
integer (int32) Required

The data processing engine ID to use for the connection

connectionType
string Required
Valid values[ "SqlServer", "OLEDB", "ODBC", "Snowflake", "PostgreSql", "PythonScript", "SnowflakeEngine" ]
dataSourceTemplateId
integer (int32) | null

The data source template ID to use for the connection

dataAgentGroupId
integer (int32) | null

The data agent group ID to use for the connection

description
string | null

The connection description

configuration

The connection's configuration

OneOf
Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase)
connectionString
string Required

The connection configuration's connection string

Min length1
password
string | null

The connection configuration's password

Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript)
preExecutionScript
string | null

The script to run prior to data source executions

postExecutionScript
string | null

The script to run following data source executions

parameters
Array of object (Configuration.Api.Models.v1.DataSourceConnectionParsedParameter) | null

List of parameters associated with the data source script connection

object
id
integer (int32)

The ID of the parameter

value
string | null

The Value of the parameter

hasSecretValue
boolean

Whether the parameter has a secret value

clearValue
boolean

Whether the parameter should clear its value

resetValue
boolean

Whether the parameter should reset its value

Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake)
databaseName
string Required

The name of the Snowflake database being referenced by the connection

Min length1
schemaName
string | null

The name of the Snowflake schema being referenced by the connection

projectIds
Array of integer | null

The IDs of the projects allowed to use the data source

integer (int32)
permissions
Array of object (Configuration.Api.Models.v1.DataSourcePermission) Required

List of permissions to add to the data source

object
type
string Required
Valid values[ "User", "Group" ]
name
string Required

The permission holder name

Min length1
roleSet
string | null

The name of a predefined role set

roles
Array of string (Configuration.Api.Models.v1.DataSourceRole) | null

The custom roles to use when the roleSet property is empty

string
Valid values[ "ViewMetadata", "CreateTests", "RunTests", "ViewTestResults", "RunProfileSets", "ManagePermissions", "ManageConnections", "ManageDataProfiling", "ExportTestResults" ]
Expand All
object
name
string Required

The data source name

Min length1
description
string | null

The data source description

environmentId
integer (int32) Required

The ID of the data source's environment

connection
object (Configuration.Api.Models.v1.DataSourceConnectionAdd) Required
engineId
integer (int32) Required

The data processing engine ID to use for the connection

connectionType
string Required
Valid values[ "SqlServer", "OLEDB", "ODBC", "Snowflake", "PostgreSql", "PythonScript", "SnowflakeEngine" ]
dataSourceTemplateId
integer (int32) | null

The data source template ID to use for the connection

dataAgentGroupId
integer (int32) | null

The data agent group ID to use for the connection

description
string | null

The connection description

configuration

The connection's configuration

OneOf
Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationDatabase)
connectionString
string Required

The connection configuration's connection string

Min length1
password
string | null

The connection configuration's password

Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationScript)
preExecutionScript
string | null

The script to run prior to data source executions

postExecutionScript
string | null

The script to run following data source executions

parameters
Array of object (Configuration.Api.Models.v1.DataSourceConnectionParsedParameter) | null

List of parameters associated with the data source script connection

object
id
integer (int32)

The ID of the parameter

value
string | null

The Value of the parameter

hasSecretValue
boolean

Whether the parameter has a secret value

clearValue
boolean

Whether the parameter should clear its value

resetValue
boolean

Whether the parameter should reset its value

Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake
object (Configuration.Api.Models.v1.DataSourceConnectionConfigurationSnowflake)
databaseName
string Required

The name of the Snowflake database being referenced by the connection

Min length1
schemaName
string | null

The name of the Snowflake schema being referenced by the connection

projectIds
Array of integer | null

The IDs of the projects allowed to use the data source

integer (int32)
permissions
Array of object (Configuration.Api.Models.v1.DataSourcePermission) Required

List of permissions to add to the data source

object
type
string Required
Valid values[ "User", "Group" ]
name
string Required

The permission holder name

Min length1
roleSet
string | null

The name of a predefined role set

roles
Array of string (Configuration.Api.Models.v1.DataSourceRole) | null

The custom roles to use when the roleSet property is empty

string
Valid values[ "ViewMetadata", "CreateTests", "RunTests", "ViewTestResults", "RunProfileSets", "ManagePermissions", "ManageConnections", "ManageDataProfiling", "ExportTestResults" ]
Responses
200

OK

object
id
integer (int32)

The ID of the added data source

name
string | null

The name of the added data source

400

Bad Request

object
errors
Array of string | null
string
403

Forbidden