UpdateServerStatus

 

ServerService / UpdateServerStatus

 

Description: Update server status

URL: http://{your-server-url}/api/v1/core/servers/statuses/{statusguid}

Method: PUT

Token Required: True


Request Headers:
content-type: application/json or content-type: application/xml
token: {token}
Request:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Server.ServerRequest

Parameter Type Nullable Comment
Request.ServerStatus Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Servers.ServerStatus False Server object only requires server's Guid

Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Server.ServerResponse

Parameter Type Comment
Response.ServerStatus Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Servers.ServerStatus Server Object only return server's Guid and Name

Enums:
Field Name Values
Type Nexus.AppSpace.Service.Contract.Model.Enums.Server.ServerType SmartHub = 0, Undefined = 1

The following is an example request Xml body:
<ServerRequest xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Server" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ServerStatus xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Servers">
    <a:EndTime>2014-06-17T16:58:36.8813466Z</a:EndTime>
    <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
    <a:Server>
      <a:AccountId>123</a:AccountId>
      <a:CreatedDate>2014-06-17T16:58:36.8813466Z</a:CreatedDate>
      <a:Description>String</a:Description>
      <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
      <a:IP>String</a:IP>
      <a:LastUpdated>2014-06-17T16:58:36.8813466Z</a:LastUpdated>
      <a:MetaData xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
        <b:KeyValuePair>
          <b:Key>String</b:Key>
          <b:Value>String</b:Value>
        </b:KeyValuePair>
      </a:MetaData>
      <a:Name>String</a:Name>
      <a:Priority>123</a:Priority>
      <a:Provider>String</a:Provider>
      <a:Type>Undefined</a:Type>
    </a:Server>
    <a:StartTime>2014-06-17T16:58:36.8813466Z</a:StartTime>
    <a:Status>Communication_Lost</a:Status>
  </ServerStatus>
</ServerRequest>

The following is an example request Json body:
{
	"ServerStatus":{
		"EndTime":"\/Date(1403024316881)\/",
		"Guid":"11111111-1111-1111-1111-111111111111",
		"Server":{
			"AccountId":123,
			"CreatedDate":"\/Date(1403024316881)\/",
			"Description":"String",
			"Guid":"11111111-1111-1111-1111-111111111111",
			"IP":"String",
			"LastUpdated":"\/Date(1403024316881)\/",
			"MetaData":[
				{
					"Key":"String",
					"Value":"String"
				}
			],
			"Name":"String",
			"Priority":123,
			"Provider":"String",
			"Type":1
		},
		"StartTime":"\/Date(1403024316881)\/",
		"Status":3
	}
}

The following is an example response Xml body:
<ServerResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Server" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DebugMessage xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">String</DebugMessage>
  <Errors xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">
    <Error>
      <Code>String</Code>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
    </Error>
  </Errors>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">Success</Status>
  <ServerStatus xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Servers">
    <a:EndTime>2014-06-17T16:58:36.8813466Z</a:EndTime>
    <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
    <a:Id>123</a:Id>
    <a:Server>
      <a:AccountId>123</a:AccountId>
      <a:CreatedDate>2014-06-17T16:58:36.8813466Z</a:CreatedDate>
      <a:Description>String</a:Description>
      <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
      <a:IP>String</a:IP>
      <a:Id>123</a:Id>
      <a:LastUpdated>2014-06-17T16:58:36.8813466Z</a:LastUpdated>
      <a:MetaData xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
        <b:KeyValuePair>
          <b:Key>String</b:Key>
          <b:Value>String</b:Value>
        </b:KeyValuePair>
      </a:MetaData>
      <a:Name>String</a:Name>
      <a:Priority>123</a:Priority>
      <a:Provider>String</a:Provider>
      <a:Type>Undefined</a:Type>
    </a:Server>
    <a:StartTime>2014-06-17T16:58:36.8813466Z</a:StartTime>
    <a:Status>Communication_Lost</a:Status>
  </ServerStatus>
</ServerResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"ServerStatus":{
		"EndTime":"\/Date(1403024316881)\/",
		"Guid":"11111111-1111-1111-1111-111111111111",
		"Id":123,
		"Server":{
			"AccountId":123,
			"CreatedDate":"\/Date(1403024316881)\/",
			"Description":"String",
			"Guid":"11111111-1111-1111-1111-111111111111",
			"IP":"String",
			"Id":123,
			"LastUpdated":"\/Date(1403024316881)\/",
			"MetaData":[
				{
					"Key":"String",
					"Value":"String"
				}
			],
			"Name":"String",
			"Priority":123,
			"Provider":"String",
			"Type":1
		},
		"StartTime":"\/Date(1403024316881)\/",
		"Status":3
	}
}