mirror of
https://github.com/microsoft/fabric-rest-api-specs.git
synced 2026-11-04 12:04:23 +00:00
266 lines
11 KiB
JSON
266 lines
11 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "SQLDatabase data types",
|
|
"version": "v1"
|
|
},
|
|
"paths": {},
|
|
"definitions": {
|
|
"SQLDatabase": {
|
|
"description": "A SQL database object.",
|
|
"type": "object",
|
|
"required": ["type"],
|
|
"allOf": [
|
|
{
|
|
"$ref": "../common/definitions.json#/definitions/Item"
|
|
}
|
|
],
|
|
"properties": {
|
|
"properties": {
|
|
"description": "The SQLDatabase properties.",
|
|
"$ref": "#/definitions/SQLDatabaseProperties"
|
|
}
|
|
}
|
|
},
|
|
"SQLDatabases": {
|
|
"description": "A list of SQL databases.",
|
|
"required": ["value"],
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"description": "A list of SQL databases.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SQLDatabase"
|
|
}
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "../common/definitions.json#/definitions/PaginatedResponse"
|
|
}
|
|
]
|
|
},
|
|
"SQLDatabaseProperties": {
|
|
"required": ["connectionString", "databaseName", "serverFqdn"],
|
|
"description": "The SQL database properties.",
|
|
"type": "object",
|
|
"properties": {
|
|
"connectionString": {
|
|
"description": "The connection string of the database.",
|
|
"type": "string"
|
|
},
|
|
"databaseName": {
|
|
"description": "The database name.",
|
|
"type": "string"
|
|
},
|
|
"serverFqdn": {
|
|
"description": "The server fully qualified domain name (FQDN).",
|
|
"type": "string"
|
|
},
|
|
"earliestRestorePoint": {
|
|
"description": "The earliest restore point of the database in UTC, using the YYYY-MM-DDTHH:mm:ssZ format.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"latestRestorePoint": {
|
|
"description": "The latest restore point of the database in UTC, using the YYYY-MM-DDTHH:mm:ssZ format.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"backupRetentionDays": {
|
|
"description": "The backup retention period in days.",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"CreateSQLDatabaseRequest": {
|
|
"description": "Create SQL database request payload.",
|
|
"required": ["displayName"],
|
|
"properties": {
|
|
"displayName": {
|
|
"description": "The SQL database display name. The display name must follow naming rules according to item type.",
|
|
"type": "string",
|
|
"readOnly": false
|
|
},
|
|
"description": {
|
|
"description": "The SQL database description. Maximum length is 256 characters.",
|
|
"type": "string",
|
|
"readOnly": false
|
|
},
|
|
"folderId": {
|
|
"description": "The folder ID. If not specified or null, the SQL database is created with the workspace as its folder.",
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"readOnly": false
|
|
},
|
|
"creationPayload": {
|
|
"description": "The SQL database creation payload.",
|
|
"$ref": "#/definitions/SQLDatabaseCreationPayload",
|
|
"readOnly": false
|
|
},
|
|
"definition": {
|
|
"description": "The SQL database definition.",
|
|
"$ref": "#/definitions/SQLDatabaseDefinition",
|
|
"readOnly": false
|
|
}
|
|
}
|
|
},
|
|
"UpdateSQLDatabaseRequest": {
|
|
"description": "Update SQL database request.",
|
|
"properties": {
|
|
"description": {
|
|
"description": "The SQL database description. Maximum length is 256 characters.",
|
|
"type": "string",
|
|
"readOnly": false
|
|
}
|
|
}
|
|
},
|
|
"UpdateSQLDatabaseDefinitionRequest": {
|
|
"description": "Update SQL database public definition request payload.",
|
|
"required": ["definition"],
|
|
"properties": {
|
|
"definition": {
|
|
"$ref": "#/definitions/SQLDatabaseDefinition"
|
|
}
|
|
}
|
|
},
|
|
"SQLDatabaseDefinitionResponse": {
|
|
"description": "The SQL database public definition response.",
|
|
"required": ["definition"],
|
|
"properties": {
|
|
"definition": {
|
|
"$ref": "#/definitions/SQLDatabaseDefinition",
|
|
"readOnly": true
|
|
}
|
|
}
|
|
},
|
|
"SQLDatabaseCreationPayload": {
|
|
"description": "SQL database item payload.",
|
|
"type": "object",
|
|
"required": [
|
|
"creationMode"
|
|
],
|
|
"discriminator": "creationMode",
|
|
"properties": {
|
|
"creationMode": {
|
|
"description": "The creation mode of the SQL database creation.",
|
|
"$ref": "#/definitions/CreationMode"
|
|
},
|
|
"backupRetentionDays": {
|
|
"description": "Set the backup retention period in days. The minimum is 1 days. The maximum is 35 days.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"minimum": 1,
|
|
"maximum": 35
|
|
},
|
|
"restorePointInTime": {
|
|
"description": "Set the time to restore the source database in UTC, using the YYYY-MM-DDTHH:mm:ssZ format.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"sourceDatabaseReference": {
|
|
"description": "Set the reference for the source database to be restored from.",
|
|
"$ref": "../common/definitions.json#/definitions/ItemReference"
|
|
}
|
|
}
|
|
},
|
|
"CreationMode": {
|
|
"description": "The creation mode of the creation payload. Additional CreationMode types may be added over time.",
|
|
"type": "string",
|
|
"enum": [ "New", "Restore" ],
|
|
"x-ms-enum": {
|
|
"name": "CreationMode",
|
|
"modelAsString": true,
|
|
"values": [
|
|
{
|
|
"value": "New",
|
|
"description": "The default creation mode. 'backupRetentionDays' object is accepted in this creation mode."
|
|
},
|
|
{
|
|
"value": "Restore",
|
|
"description": "The creation mode of restoring from a source database. 'sourceDatabaseReference' object and 'restorePointInTime' object are required for this creation mode. 'backupRetentionDays' object is not accepted."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"NewSQLDatabaseCreationPayload": {
|
|
"description": "Create a SQL database item creation payload with supported settings",
|
|
"type": "object",
|
|
"properties": {
|
|
"backupRetentionDays": {
|
|
"description": "Set the backup retention period in days. The minimum is 1 days. The maximum is 35 days.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"minimum": 1,
|
|
"maximum": 35
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/SQLDatabaseCreationPayload"
|
|
}
|
|
],
|
|
"x-ms-discriminator-value": "New"
|
|
},
|
|
"RestoreSQLDatabaseCreationPayload": {
|
|
"description": "Create a SQL database item creation payload with restoring from a source database",
|
|
"type": "object",
|
|
"properties": {
|
|
"restorePointInTime": {
|
|
"description": "Set the time to restore the source database in UTC, using the YYYY-MM-DDTHH:mm:ssZ format.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"sourceDatabaseReference": {
|
|
"description": "Set the reference for the source database to be restored from.",
|
|
"$ref": "../common/definitions.json#/definitions/ItemReference"
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/SQLDatabaseCreationPayload"
|
|
}
|
|
],
|
|
"x-ms-discriminator-value": "Restore"
|
|
},
|
|
"SQLDatabaseDefinition" : {
|
|
"description": "The SQL database public definition object. Refer to this [article](/rest/api/fabric/articles/item-management/definitions/sql-database-definition) for more details on how to craft a SQL database public definition.",
|
|
"type": "object",
|
|
"required": ["parts"],
|
|
"properties": {
|
|
"parts": {
|
|
"description": "A list of definition parts.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SQLDatabasePublicDefinitionPart"
|
|
},
|
|
"readOnly": false
|
|
}
|
|
}
|
|
},
|
|
"SQLDatabasePublicDefinitionPart": {
|
|
"description": "SQL database definition part object.",
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"description": "The SQL database public definition part path.",
|
|
"type": "string",
|
|
"readOnly": false
|
|
},
|
|
"payload": {
|
|
"description": "The SQL database public definition part payload.",
|
|
"type": "string",
|
|
"readOnly": false
|
|
},
|
|
"payloadType":{
|
|
"description": "The payload type.",
|
|
"$ref": "../common/definitions.json#/definitions/PayloadType",
|
|
"readOnly": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|