POST api/Hosting/{hosting_handle}/Db

Create a new db on the given hosting

Request Information

URI Parameters

NameDescriptionTypeAdditional information
hosting_handle

Hosting object handle

string

Required

Body Parameters

Body - the user to create

Db
NameDescriptionTypeAdditional information
Name

Database name

string

None.

HostingHandle

Hosting handle

string

None.

User

Database user name

string

None.

Pwd

Database user password. Returned once on db creation

string

None.

Type

Database type - sqlserver2k5 (windows only), mysql5

string

None.

Size

Database size

integer

None.

MaxSize

Max size

integer

None.

ServerId

integer

None.

DateCre

Date created

date

None.

DateReq

Date requested

date

None.

Etat

Status

string

None.

UserLang

User language

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "HostingHandle": "sample string 2",
  "User": "sample string 3",
  "Pwd": "sample string 4",
  "Type": "sample string 5",
  "Size": 6,
  "MaxSize": 7,
  "ServerId": 8,
  "DateCre": "2025-04-04T00:14:27.6504617+02:00",
  "DateReq": "2025-04-04T00:14:27.6504617+02:00",
  "Etat": "sample string 11",
  "UserLang": "sample string 12"
}

application/xml, text/xml

Sample:
<Db xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
  <DateCre>2025-04-04T00:14:27.6504617+02:00</DateCre>
  <DateReq>2025-04-04T00:14:27.6504617+02:00</DateReq>
  <Etat>sample string 11</Etat>
  <HostingHandle>sample string 2</HostingHandle>
  <MaxSize>7</MaxSize>
  <Name>sample string 1</Name>
  <Pwd>sample string 4</Pwd>
  <ServerId>8</ServerId>
  <Size>6</Size>
  <Type>sample string 5</Type>
  <User>sample string 3</User>
  <UserLang>sample string 12</UserLang>
</Db>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The db object on success
Collection of errors on failure
Return codes
200 - ok
300 - ambiguous
401 - unauthorized
404 - not found
500 - internal server error
513 - quota exceeded
530 - invalid attribute value

Db
NameDescriptionTypeAdditional information
Name

Database name

string

None.

HostingHandle

Hosting handle

string

None.

User

Database user name

string

None.

Pwd

Database user password. Returned once on db creation

string

None.

Type

Database type - sqlserver2k5 (windows only), mysql5

string

None.

Size

Database size

integer

None.

MaxSize

Max size

integer

None.

ServerId

integer

None.

DateCre

Date created

date

None.

DateReq

Date requested

date

None.

Etat

Status

string

None.

UserLang

User language

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "HostingHandle": "sample string 2",
  "User": "sample string 3",
  "Pwd": "sample string 4",
  "Type": "sample string 5",
  "Size": 6,
  "MaxSize": 7,
  "ServerId": 8,
  "DateCre": "2025-04-04T00:14:27.6504617+02:00",
  "DateReq": "2025-04-04T00:14:27.6504617+02:00",
  "Etat": "sample string 11",
  "UserLang": "sample string 12"
}

application/xml, text/xml

Sample:
<Db xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
  <DateCre>2025-04-04T00:14:27.6504617+02:00</DateCre>
  <DateReq>2025-04-04T00:14:27.6504617+02:00</DateReq>
  <Etat>sample string 11</Etat>
  <HostingHandle>sample string 2</HostingHandle>
  <MaxSize>7</MaxSize>
  <Name>sample string 1</Name>
  <Pwd>sample string 4</Pwd>
  <ServerId>8</ServerId>
  <Size>6</Size>
  <Type>sample string 5</Type>
  <User>sample string 3</User>
  <UserLang>sample string 12</UserLang>
</Db>