POST api/Hosting/{hosting_handle}/Access

Create a new secured directory on the given hosting

Request Information

URI Parameters

NameDescriptionTypeAdditional information
hosting_handle

Hosting object handle

string

Required

Body Parameters

Body - the user to create

Access
NameDescriptionTypeAdditional information
Id

Alias id

decimal number

None.

HostingHandle

Hosting handle

string

None.

Dir

Relative directory path

string

Max length: 100

Users

List of users with access

Collection of AccessUser

None.

Legend

string

None.

Desrciption

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1.0,
  "HostingHandle": "sample string 2",
  "Dir": "sample string 3",
  "Users": [
    {
      "Login": "sample string 1",
      "Password": "sample string 2"
    },
    {
      "Login": "sample string 1",
      "Password": "sample string 2"
    }
  ],
  "Legend": "sample string 4",
  "Desrciption": "sample string 5"
}

application/xml, text/xml

Sample:
<Access xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
  <Desrciption>sample string 5</Desrciption>
  <Dir>sample string 3</Dir>
  <HostingHandle>sample string 2</HostingHandle>
  <Id>1</Id>
  <Legend>sample string 4</Legend>
  <Users>
    <AccessUser>
      <Login>sample string 1</Login>
      <Password>sample string 2</Password>
    </AccessUser>
    <AccessUser>
      <Login>sample string 1</Login>
      <Password>sample string 2</Password>
    </AccessUser>
  </Users>
</Access>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The access object on success
Collection of errors on failure
Return codes
200 - ok
300 - ambiguous
401 - unauthorized
404 - not found
500 - internal server error
525 - object already registered
530 - invalid attribute value
803 - Invalid os for this operation

Access
NameDescriptionTypeAdditional information
Id

Alias id

decimal number

None.

HostingHandle

Hosting handle

string

None.

Dir

Relative directory path

string

Max length: 100

Users

List of users with access

Collection of AccessUser

None.

Legend

string

None.

Desrciption

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1.0,
  "HostingHandle": "sample string 2",
  "Dir": "sample string 3",
  "Users": [
    {
      "Login": "sample string 1",
      "Password": "sample string 2"
    },
    {
      "Login": "sample string 1",
      "Password": "sample string 2"
    }
  ],
  "Legend": "sample string 4",
  "Desrciption": "sample string 5"
}

application/xml, text/xml

Sample:
<Access xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
  <Desrciption>sample string 5</Desrciption>
  <Dir>sample string 3</Dir>
  <HostingHandle>sample string 2</HostingHandle>
  <Id>1</Id>
  <Legend>sample string 4</Legend>
  <Users>
    <AccessUser>
      <Login>sample string 1</Login>
      <Password>sample string 2</Password>
    </AccessUser>
    <AccessUser>
      <Login>sample string 1</Login>
      <Password>sample string 2</Password>
    </AccessUser>
  </Users>
</Access>