• No results found

Cloud DNS Client API. Development Guideline

N/A
N/A
Protected

Academic year: 2021

Share "Cloud DNS Client API. Development Guideline"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

Cloud DNS ­ Client API

Development Guideline

(v1.1)

(Date : 23th April, 2013)

Power­All Networks Ltd.

(2)

Table of content

Section 1 ­ API List of CDNS

3

Section 2 ­ Possible common errors

4

Section 3 ­ Before coding

5

Section 4 ­ API Specification

     create_load_balance

6

     create_failover

9

     search_dns_rule

12

     show_rule_detail

14

     remove_rule

16

     update_load_balance

17

     update_failover

20

    

create_domain_parking

23

    

update_doman_parking

24

    

remove_domain_parking

25

     search_domain_parking

26

     dns_add_record

28

     dns_update_record

30

     dns_remove_record

32

     dns_search_record

33

(3)

Section 1 ­ API List for CDNS

Following are available client API for DNS access.

API Type API ID API Name

General API CDNS­GEN­0001 create_load_balance CDNS­GEN­0002 create_failover CDNS­GEN­0003 search_dns_rule CDNS­GEN­0004 show_rule_detail CDNS­GEN­0005 remove_rule CDNS­GEN­0006 update_load_balance CDNS­GEN­0007 update_failover CDNS­GEN­0008 create_domain_parking CDNS­GEN­0009 update_doman_parking CDNS­GEN­0010 remove_domain_parking CDNS­GEN­0011 search_domain_parking CDNS­GEN­0012 dns_add_record CDNS­GEN­0013 dns_update_record CDNS­GEN­0014 dns_remove_record CDNS­GEN­0015 dns_search_record

(4)

Section 2 ­ Possible Common Errors

Following are common error which possible occur on all client API so your program should

handle such common error.

Error Code Error Description HTTP Status Code

InvalidLocale Invalid Locale 400 InvalidHeader Invalid header 400 ExpiredSig Expired signature and request 400 NotExistMem Member record not exists 400 FailAuth Fail to authenticate 403 UnexpectedError Unexpected error 500 UnavailableService System is under maintenance and will recover soon 503

(5)

Section 3 ­ Before Coding

1.

if passing member access id, user only can access own related resource.

e.g. search_dns_rule ­ it show user owned rules only.

if passing admin. access id, user can access other user’s resource.

e.g. search_dns_rule ­ it can search other member owned rule.

(Most end user doesn’t own the admin. access ID)

2.

“Admin.” account can create/update/remove rule for any member.

In related API, must assign the member access id in <MemberAccessID> tag.

In authentication, use admin access ID and signature. System can identify the role of caller.

3.

DNS name restrictions (check in API side) :

­ max length 20

­ except first and last characters, all can be alphanumeric, hypen “­” or underscore “_”.

­ first character can be hypen “­” or underscore “_”.

­ last character can be underscore “_”.

(6)

API Specification

API ID

CDNS­GEN­0001 REST http method PUT

API Name create_load_balance API Type General API Description Create load balancing rule. (i.e. A list of IP) REST URI http://a.cdns.mygrid.asia/create_load_balance/locale/en Input Parameters ­ Locale Code Note ­ For “Weight” method, can enter 1 or above value for <HostWeight> ­ For <MonitorType>, support T (TCP). If choose TCP, enter port no. in <MonitorPortNO> Input XML <AddLoadBalance>     <MainDataProfile>  <Type>D</Type>   (D­DNS base, U­URL base)  <Method>R</Method> (R­Round Robin, W­Weight)  <DNSName>skywalk</DNSName> <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk5811</MemberAccessID>          <SubscriptionID></SubscriptionID> (optional)          <Description>this is first input.</Description>     </MainDataProfile>     <Monitor>  <EnableMonitor>Y</EnableMonitor>  (Y­YES, N­NO)  <MonitorType>P</MonitorType>   (P­Ping, A­API Call, T­TCP)  <AlertTimes>3</AlertTimes>         <AutoFailover>Y</AutoFailover>   (Y­Yes, N­No)         <MonitorPortNO></MonitorPortNO>  (Option to enter once choose TCP)  <APIMonitor>   (only input when Monitor type=A) <APIProtocol></APIProtocol> (http or https) <APIURI></APIURI>  (e.g. test/tester.html)  <ExpectedReturn></ExpectedReturn>  </APIMonitor>  <FallbackAction>  <FallbackMethod>M</FallbackMethod> (M­manual, A­Auto)  <NoOfSuccessForAuto></NoOfSuccessForAuto>       (Only input when FallbackMethod=A)  </FallbackAction>     </Monitor>     <HostRecordList>  <HostRecord>  (Only accept IP address)  <HostContent>202.1.1.1</HostContent>  <HostDescription>Apple</HostDescription>       (if not data for description, enter “dash” (­))

(7)

      <HostWeight>1</HostWeight>  </HostRecord>     </HostRecordList> </AddLoadBalance> Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code MissingMemberAccessID missing memeber access ID 400 InvalidMemberAccessID invalid member access ID 400 ACPrb Account problem 400 InvalidType invalid load balance type 400 InvalidLoadBalancingMethod invalid load balance method 400 InvalidDNSName invalid DNS name 400 InvalidEnableMonitor invalid enable monitor 400 InvalidMonitorType invalid monitor type 400 InvalidAlertTimes invalid no of alert times 400 ExceedAlertTimes Can’t exceed a specified no. e.g. 10 400 MissingMonitorPortNO Missing TCP port number 400 InvalidMonitorPortNO Invalid TCP port number 400 InvalidAPIURL invalid API URL 400 InvalidAPIURI invalid API URI 400 InvalidAPIProtocol invalid API protocol 400 MissingAPIReturnValue missed expected return value for API 400 InvalidFallbackAction invalid fallback action 400 InvalidFallbackSuccessNumb er invalid no. for success fallback 400

(8)

InvalidHostContent invalid host content 400 ExceedMaxIPHost exceed the maximum accepted no. of host in 1 rule 400 InvalidHostDescription invalid host description 400 MissingHostIPOrHostDescripti on missed host, ip or host description 400 InvalidHostWeight Invalid weight value 400 InvalidSubscriptionID Invalid subscription ID 400 SubscriptionExpired Plan expired 400 PlanNotFound Plan not found 400 ExceedSubscriptionQuota Exceed the quota of plan 400 DuplicatedDNSName duplicated DNS name 400 DuplicateDataEntry duplicated DNS record in backend 400 InvalidAutoFailover invalid auto failover 400 FailCreateLoadBalance fail to create load balance rule record 403

(9)

API ID

CDNS­GEN­0002 REST http method PUT

API Name create_failover API Type General API Description create failover (support host name or IP) REST URI http://a.cdns.mygrid.asia/create_failover/locale/en Input Parameters ­ Locale Code Note Add DNS record for host which <HostPriority> value is lowest. <HostPriority> 1 is highest priority. Higher value has lower priority. Input XML <AddFailover>     <MainDataProfile>  <Type>H</Type>   (IP­IP address, H­Host)  <Method>M</Method> (M­manual, A­Auto)  <DNSName>skywalk</DNSName> <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID>         <SubscriptionID></SubscriptionID> (optional)         <Description></Description>     </MainDataProfile>     <Monitor>  <EnableMonitor>Y</EnableMonitor>  (Y­YES, N­NO)  <MonitorType>P</MonitorType>   (P­Ping, A­API Call, T­TCP)  <AlertTimes>3</AlertTimes>         <MonitorPortNO></MonitorPortNO> (optional port no)  <APIMonitor>   (only input when Monitor type=A) <APIProtocol></APIProtocol> (http or https) <APIURI></APIURI>  (e.g. test/tester.html)  <ExpectedReturn></ExpectedReturn>  </APIMonitor>  <FallbackAction>  <IsAutoFallback>Y</IsAutoFallback> (Y­Yes, N­No)  <NoOfSuccessForAuto></NoOfSuccessForAuto>       (Only input when IsAutoFallback=Y)  </FallbackAction>     </Monitor>     <HostRecordList>  <HostRecord>  (accept IP address and hostname too)  <HostContent>202.1.1.1</HostContent>  <HostDescription>Apple</HostDescription>       (if not data for description, enter “dash” (­))  <HostPriority>1</HostPriority> (       (positive integer and can’t be duplicated)  </HostRecord>     </HostRecordList> </AddFailover> Return http status

201

(10)

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code MissingMemberAccessID missing memeber access ID 400 InvalidMemberAccessID invalid member access ID 400 InvalidType invalid load balance type 400 InvalidFailoverMethod invalid failover method 400 InvalidDNSName invalid DNS name 400 InvalidEnableMonitor invalid enable monitor 400 InvalidMonitorType invalid monitor type 400 InvalidAlertTimes invalid no of alert times 400 ExceedAlertTimes Can’t exceed a specified no. e.g. 10 400 InvalidAPIURL invalid API URL 400 InvalidAPIURI invalid API URI 400 InvalidAPIProtocol invalid API protocol 400 MissingAPIReturnValue missed expected return value for API 400 InvalidFallbackAction invalid fallback action 400 InvalidFallbackSuccessNumb er invalid no. for success fallback 400 InvalidHostContent invalid host content 400 ExceedMaxIPHost exceed the maximum accepted no. of host in 1 rule 400 InvalidHostDescription invalid host description 400 InvalidPriority invalid priority 400 MissingHostIPOrHostDescripti onOrPriority missed host, ip, host description or priority 400

(11)

InvalidSubscriptionID Invalid subscription ID 400 SubscriptionExpired Plan expired 400 PlanNotFound Plan not found 400 ExceedSubscriptionQuota Exceed the quota of plan 400 DuplicatedPriorityValue duplicated prioriy value 400 DuplicatedDNSName duplicated DNS name 400 DuplicateDataEntry duplicated DNS record in backend 400 FailCreateFailover fail to create failover rule record 403

(12)

API ID

CDNS­GEN­0003 REST http method PUT

API Name search_dns_rule API Type General API Description search DNS rule record due to different criteria REST URI http://a.cdns.mygrid.asia/search_dns_rule/locale/en Input Parameters ­ Locale Code Input XML <SearchDNSRule>     <RuleID></RuleID>     <SubscriptionID></SubscriptionID>     <ServiceType></ServiceType>  (LB­load balance, FO­Failover)     <DNSName></DNSName>     <RuleDesc></RuleDesc>     <OwnerID></OwnerID>     <OwnerLogin></OwnerLogin>     <IP_HostName></IP_HostName>     <IP_HostNameDesc></IP_HostNameDesc> </SearchDNSRule> If admin account to call API, it can search different <OwnerID> or <OwnerLogin>. If general member account, only search his owned record. Return http status

200

Output for success case <CloudDNS>   <TotalRuleRecord>1</TotalRuleRecord>   <RuleList>   <RuleRecord>   <MainRuleProfile>     <RuleID>t1hdwEB5KlhVJCki46LOazzaOpSElmzAWIPKXzdx5bU</RuleID>     <SubscriptionID>DLNIHapHhaDQKgCDssjglJhX_lA</SubscriptionID>     <PlanID>l0IHqWR­_VdK8acfJBmWJmWEp_R6IJi28GpFzVcOm80</PlanID>     <PlanName>Premium Plan B ­ 3 Month</PlanName>     <PlanDescription>Premium Plan B ­ 3 Month</PlanDescription>     <SubscribeDate>2013­01­09T17:23:43Z</SubscribeDate>     <ExpiryDate>2013­10­09T17:23:46Z</ExpiryDate>     <IsExpired>N</IsExpired>     <IsSuspended>N</IsSuspended>     <SuspensionDate>2013­03­14T11:18:29Z</SuspensionDate>     <ServiceType>LB</ServiceType>     <DNSName>boxing</DNSName>
(13)

    <Name>boxing.cdns.mygrid.asia</Name>     <RuleDesc>it is desc</RuleDesc>     <OwnerID>QoD0IP8BPXZRgO7ekBKK2PKaMYB3wH</OwnerID>     <OwnerLogin>testing</OwnerLogin>     <LastUpdateDate>2012­08­01T09:12:23Z</LastUpdateDate>   </MainRuleProfile>   <MappedDNSList>   <MappedRecord>     <IP_Host>202.1.1.1</IP_Host>     <IP_HostWeight>1</IP_HostWeight>     <IP_HostDesc>first server</IP_HostDesc>     <IP_HostEnable>Y</IP_HostEnable> (Y­YES, N­NO)     <IP_HostPossibleDown>Y</IP_HostPossibleDown>(Y­YES, N­NO)     <IP_HostHasDNSRecord>Y</IP_HostHasDNSRecord>(Y­YES, N­NO)     <IP_HostPriority>0</IP_HostPriority>   </MappedRecord>   <MappedRecord>     <IP_Host>202.1.1.12</IP_Host>     <IP_HostWeight>1</IP_HostWeight>     <IP_HostDesc>2nd server</IP_HostDesc>     <IP_HostEnable>Y</IP_HostEnable>     <IP_HostPossibleDown>Y</IP_HostPossibleDown>     <IP_HostHasDNSRecord>Y</IP_HostHasDNSRecord>     <IP_HostPriority>0</IP_HostPriority>    </MappedRecord></MappedDNSList>   </RuleRecord> </RuleList> </CloudDNS> Possible Errors

Error Code Error Description HTTP Status

Code

NoAccessRight no access right 400 NotSupportedServiceType not supported service type 400

(14)

API ID

CDNS­GEN­0004 REST http method GET

API Name show_rule_detail API Type General API Description search DNS rule record due to different criteria REST URI http://a.cdns.mygrid.asia/show_rule_detail/locale/en/rule_id/dksfjksdfjkdsfjkdlsfjk Input Parameters ­ Locale Code ­ Rule ID Input XML No XML Return http status

200

Note If member account to call this API, only get own information. User can’t check other user’s record. If administrative account, it can check all accounts’ information. Output for success case <CloudDNS>   <RuleProfile> <RuleID>betstvfCNy0mql7­JYzzXjSBaquCWXXxIpMq6id0S64</RuleID>        <SubscriptionID>DLNIHapHhaDQKgCDssjglJX_lA</SubscriptionID>        <PlanID>l0IHqWR­_VdK8acfJBmWJmWEp_R6IJi28GpFzVcOm80</PlanID>        <PlanName>Premium Plan B ­ 3 Month</PlanName>        <PlanDescription>Premium Plan B ­ 3 Month</PlanDescription>        <SubscribeDate>2013­01­09T17:23:43Z</SubscribeDate>        <ExpiryDate>2013­10­09T17:23:46Z</ExpiryDate>        <IsExpired>N</IsExpired> <Service>FO</Service> <Type>H</Type> <Method>M</Method> <DNSName>skywalk</DNSName> <Description>banana</Description> <OwnerID>QoD0IP8BPXZRgO7ekBKK2PKaMYB3wH</OwnerID> <OwnerLogin>testing</OwnerLogin> <LastUpdateDate>2012­08­02T10:24:27Z</LastUpdateDate>   </RuleProfile>   <MonitorProfile> <EnableMonitor>Y</EnableMonitor> <MonitorType>A</MonitorType> <AlertThresholdTimes>3</AlertThresholdTimes> <APIProtocol>http</APIProtocol>        <APIURI>tester.html</APIURI> <APIExpectedReturn>yes</APIExpectedReturn> <AutoFailover>N</AutoFailover>
(15)

        <MonitorPortNO>23</MonitorPortNO>   </MonitorProfile>   <Fallback> <FallbackMethod>M</FallbackMethod>  For load balance, M­manual and A­Auto        or        <IsAutoFallback>Y</IsAutoFallback>  For Failover, Y­Yes and N­No <NoOfSucccessForAutoFallback>3</NoOfSucccessForAutoFallback>   </Fallback>   <HostList> <HostRecord> <IP_Host>banana.com</IP_Host> <IP_HostDesc>banana</IP_HostDesc>        <IP_HostEnable>Y</IP_HostEnable> (Y­YES, N­NO)        <IP_HostPossibleDown>N</IP_HostPossibleDown> (Y­YES, N­NO)        <IP_HostHasDNSRecord>Y</IP_HostHasDNSRecord>(Y­YES, N­NO) <IP_HostPriority>2</IP_HostPriority>        <IP_HostWeight>3</IP_HostWeight> </HostRecord>   </HostList> </CloudDNS> Possible Errors

Error Code Error Description HTTP Status

Code

NoAccessRight no access right 400 NoSuchRuleID No such rule ID 400

(16)

API ID

CDNS­GEN­0005 REST http method DELETE

API Name remove_rule API Type General API Description Remove specified rule REST URI http://a.cdns.mygrid.asia/remove_rule/locale/en/rule_id/dksfjksdfjkdsfjkdlsfjk Input Parameters ­ Locale Code ­ Rule ID Input XML No XML Return http status

200

Note If use member account to call, only remove own rule. If use admin. account, can remove any user’s rule. Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code

NoAccessRight no access right 400 NoSuchRuleID No such rule ID 400

(17)

API ID

CDNS­GEN­0006 REST http method PUT

API Name update_load_balance API Type General API Description Update load balancing rule. (i.e. A list of IP) REST URI http://a.cdns.mygrid.asia/update_load_balance/locale/en Input Parameters ­ Locale Code Note <HostEnable> is to control whether enable DNS record. At least one record should be enabled. Input XML <UpdateLoadBalance>     <RuleID>kJpZX­rn_rUjV8ZtXOgWJWOV2LNEKd64FHYZ5JWMOz0</RuleID>     <NewRecord>       <MainDataProfile>    <Type>D</Type>   (D­DNS base, U­URL base)    <Method>R</Method> (R­Round Robin, W­Weight)    <DNSName>skywalk</DNSName> <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID>        <Description></Description>       </MainDataProfile>       <Monitor>    <EnableMonitor>Y</EnableMonitor>  (Y­YES, N­NO)    <MonitorType>P</MonitorType>   (P­Ping, A­API Call)    <AlertTimes>3</AlertTimes>       <AutoFailover>Y</AutoFailover>   (Y­Yes, N­No)       <MonitorPortNO></MonitorPortNO>    <APIMonitor>   (only input when Monitor type=A)    <APIProtocol></APIProtocol> (http or https)    <APIURI></APIURI>  (e.g. test/tester.html)    <ExpectedReturn></ExpectedReturn>    </APIMonitor>    <FallbackAction>  <FallbackMethod>M</FallbackMethod> (M­manual, A­Auto)  <NoOfSuccessForAuto></NoOfSuccessForAuto>       (Only input when FallbackMethod=A)    </FallbackAction>       </Monitor>       <HostRecordList>    <HostRecord>  (Only accept IP address)  <HostContent>202.1.1.1</HostContent>  <HostDescription>Apple</HostDescription>       (if not data for description, enter “dash” (­))       <HostEnable>Y</HostEnable>       (Y/N. At least 1 host be set in Y)       <HostWeight>1</HostWeight>    </HostRecord>       </HostRecordList>

(18)

    </NewRecord> </UpdateLoadBalance> Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code NoSuchRuleID No such rule ID for update 400 MissingMemberAccessID missing memeber access ID 400 InvalidMemberAccessID invalid member access ID 400 InvalidType invalid load balance type 400 InvalidLoadBalancingMethod invalid load balance method 400 InvalidDNSName invalid DNS name 400 InvalidEnableMonitor invalid enable monitor 400 InvalidMonitorType invalid monitor type 400 InvalidAlertTimes invalid no of alert times 400 ExceedAlertTimes Can’t exceed a specified no. e.g. 10 400 InvalidAPIURL invalid API URL 400 InvalidAPIURI invalid API URI 400 InvalidAPIProtocol invalid API protocol 400 MissingAPIReturnValue missed expected return value for API 400 InvalidFallbackAction invalid fallback action 400 InvalidFallbackSuccessNumb er invalid no. for success fallback 400 InvalidHostContent invalid host content 400 ExceedMaxIPHost exceed the maximum accepted no. of host in 1 rule 400 InvalidHostDescription invalid host description 400 MissingHostIPOrHostDescripti missed host, ip or host description 400

(19)

on DuplicatedDNSName duplicated DNS name 400 DuplicateDataEntry duplicated DNS record in backend 400 InvalidAutoFailover invalid auto failover 400 InvalidHostEnable Invalid enabling host value 400 MustEnableHost Must enable at least 1 host 400 FailUpdateLoadBalance fail to update load balance rule record 403

(20)

API ID

CDNS­GEN­0007 REST http method PUT

API Name update_failover API Type General API Description update failover (support host name or IP) REST URI http://a.cdns.mygrid.asia/update_failover/locale/en Input Parameters ­ Locale Code Note <HostPriority> 1 is highest priority. Higher value has lower priority. Only 1 DNS record be added which <HostEnable> is Y. Input XML <UpdateFailover>     <RuleID>vNqOGmWH9­CEPOOkHm8DN9Y7e60yxLkwiXKzFiytVcI</RuleID>     <NewRecord>       <MainDataProfile>    <Type>H</Type>   (IP­IP address, H­Host)    <Method>M</Method> (M­manual, A­Auto)    <DNSName>skywalk</DNSName> <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID>        <Description></Description>       </MainDataProfile>       <Monitor>    <EnableMonitor>Y</EnableMonitor>  (Y­YES, N­NO)    <MonitorType>P</MonitorType>   (P­Ping, A­API Call)    <AlertTimes>3</AlertTimes>       <MonitorPortNO></MonitorPortNO>    <APIMonitor>   (only input when Monitor type=A) <APIProtocol></APIProtocol> (http or https) <APIURI></APIURI>  (e.g. test/tester.html)  <ExpectedReturn></ExpectedReturn>    </APIMonitor>    <FallbackAction>  <IsAutoFallback>Y</IsAutoFallback> (Y­Yes, N­No)  <NoOfSuccessForAuto></NoOfSuccessForAuto>       (Only input when IsAutoFallback=Y)    </FallbackAction>       </Monitor>       <HostRecordList>  <HostRecord>  (accept IP address and hostname too)  <HostContent>202.1.1.1</HostContent>  <HostDescription>Apple</HostDescription>       (if not data for description, enter “dash” (­))  <HostPriority>1</HostPriority> (       (positive integer and can’t be duplicated)       <HostEnable>Y</HostEnable>  </HostRecord>       </HostRecordList>     </NewRecord> </UpdateFailover>

(21)

Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code NoSuchRuleID No such rule ID 400 MissingMemberAccessID missing memeber access ID 400 InvalidMemberAccessID invalid member access ID 400 InvalidType invalid load balance type 400 InvalidFailoverMethod invalid failover method 400 InvalidDNSName invalid DNS name 400 InvalidEnableMonitor invalid enable monitor 400 InvalidMonitorType invalid monitor type 400 InvalidAlertTimes invalid no of alert times 400 ExceedAlertTimes Can’t exceed a specified no. e.g. 10 400 InvalidAPIURL invalid API URL 400 InvalidAPIProtocol invalid API protocol 400 InvalidAPIURI invalid API URI 400 MissingAPIReturnValue missed expected return value for API 400 InvalidFallbackAction invalid fallback action 400 InvalidFallbackSuccessNumb er invalid no. for success fallback 400 InvalidHostContent invalid host content 400 ExceedMaxIPHost exceed the maximum accepted no. of host in 1 rule 400

(22)

InvalidHostDescription invalid host description 400 InvalidPriority invalid priority 400 MissingHostIPOrHostDescripti onOrPriority missed host, ip, host description or priority 400 DuplicatedPriorityValue duplicated prioriy value 400 DuplicatedDNSName duplicated DNS name 400 DuplicateDataEntry duplicated DNS record in backend 400 InvalidHostEnable Invalid enabling host value 400 MustEnableHost Only 1 host must be set 400 FailCreateFailover fail to create failover rule record 403

(23)

API ID

CDNS­GEN­0008 REST http method PUT

API Name create_domain_parking API Type General API Description Create domain parking REST URI http://a.cdns.mygrid.asia/create_domain_parking/locale/en Input Parameters ­ Locale Code Note Add domain parking reocrd. Input XML <AddDomainParking>     <ParkDomainName>abc.com</ParkDomainName>     <SerialNO></SerialNO>  (optional field. If not enter, generate by system with format YYYYMMDD00 e.g. 2013022800) <MemberAccessID>61gu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID> <SubscriptionID>DLNIHapHhaDQKgCDssjglJhxnEO_HUV7XOdcUkSX_lB</Subs criptionID> </AddDomainParking> Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code MissingMemberAccessID missing memeber access ID 400 InvalidMemberAccessID invalid member access ID 400 MissingDomain missing domain 400 InvalidDomain invalid domain 400 InvalidSerialNO invalid DNS serial no 400 FailCreateDomainParking Fail to create domain parking 400

(24)

API ID

CDNS­GEN­0009 REST http method PUT

API Name update_domain_parking API Type General API Description Update domain parking REST URI http://a.cdns.mygrid.asia/update_domain_parking/locale/en Input Parameters ­ Locale Code Note Update domain parking reocrd. Input XML <UpdateDomainParking> <ParkDomainID>CcXVr­E1nVHxiJ3F­oyxziNIDjGv311DvI</ParkDomainID>     <NewSerialNO>2013022702</NewSerialNO> </UpdateDomainParking> Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code

MissingSerialNO missing DNS serial no 400 NotExistDomainParkingRecord the parking record not exist 400 InvalidSerialNO invalid DNS serial no 400 FailUpdateDomainParking Fail to update domain parking record 400

(25)

API ID

CDNS­GEN­0010 REST http method DELETE

API Name remove_domain_parking API Type General API Description Remove domain parking REST URI http://a.cdns.mygrid.asia/remove_domain_parking/locale/en/domain_id/CcXVr­E1nV HxiJ3F­oyxziNIDjGv311DvI Input Parameters ­ Locale Code Note Remove domain parking reocrd and all related DNS records under such domain. Input XML ­­ Return http status

204

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code

NotExistDomainParkingRecord the parking record not exist 400 FailRemoveDomainParking Fail to remove domain parking record 400

(26)

API ID

CDNS­GEN­0011 REST http method PUT

API Name search_domain_parking API Type General API Description Search domain parking record(s) REST URI http://a.cdns.mygrid.asia/search_domain_parking/locale/en Input Parameters ­ Locale Code Note search domain parking reocrd. Input XML <SearchDomainParking>     <OwnerID></OwnerID>     <OwnerLogin></OwnerLogin>     <SubscriptionID></SubscriptionID> </SearchDomainParking> All fields are optional input. Return http status

201

Output for success case If no record found, show <CloudAPI>   <StatusCode>NoRecordFound</StatusCode>   <Message>No record found</Message> </CloudAPI> or if record found, show <CloudDNS>   <TotalParkingRecord>2</TotalParkingRecord>   <DomainList>     <DomainRecord> <ParkedDomainID>CcXVr­E1nVHxiJ3F­oyxziNIDjG1Dv</ParkedDomainID>       <ParkedDomainName>abctest.com</ParkedDomainName>       <SerialNumber>2013022700</SerialNumber> <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID>       <MemberLogin>tommy</MemberLogin>       <LastUpdateDate>2013­02­27T08:12:21Z</LastUpdateDate>       <SubscriptionID>DLNIHapHhaDQKgCDssjglJX_lA</SubscriptionID>       <PlanID>l0IHqWR­_VdK8acfJBmWJmWEp_R6IJi28GpFzVcOm80</PlanID>       <PlanName>Premium Plan B ­ 3 Month</PlanName>       <PlanDescription>Premium Plan B</PlanDescription>       <SubscribeDate>2013­01­09T17:23:43Z</SubscribeDate>
(27)

      <ExpiryDate>2013­10­09T17:23:46Z</ExpiryDate>       <IsExpired>N</IsExpired>       <IsSuspended>N</IsSuspended>       <SuspensionDate>2013­03­14T11:18:29Z</SuspensionDate>     </DomainRecord>   </DomainList> </CloudDNS> Possible Errors

Error Code Error Description HTTP Status

Code

NotExistDomainParkingRecord the parking record not exist 400 FailShowDomainParking Fail to remove domain parking record 400

(28)

API ID

CDNS­GEN­0012 REST http method PUT

API Name dns_add_record API Type General API Description Create DNS record for cdns.mygrid.asia or parked domain REST URI http://a.cdns.mygrid.asia/dns_add_record/locale/en Input Parameters ­ Locale Code Note DNS Type : for cdns.mygrid.asia domain, support PA record only. for parked domain, support A, AAAA, CNAME, PA, and MX records. Billing : If add PA record under cdns.mygrid.asia, it will be charged. It’s free for adding A, AAAA, MX, CNAME or PA record under parked domain. Input XML <AddDNSRecord>     <DNSType>cname</DNSType> (support A, AAAA, CNAME, PA or MX) <ParkedDomainID>gMPb0sxLPa7k2V_IUwd8VL_­fAcIm7</ParkedDomainID>      (ParkedDomainID is optional field. If empty, assume using cdns.mygrid.asia)     <RecordName>cake</RecordName>   (sub­domain name)     <Content>www.abcdef.com</Content>  (IP, host)     <Description></Description> (optional) <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID>     <SubscriptionID>DLNIHapHhaDQKgCDssjgllA</SubscriptionID>      (Must enter the Subscription ID for parked domain) </AddDNSRecord> Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

(29)

MissingMemberAccessID missing memeber access ID 400 InvalidMemberAccessID invalid member access ID 400 MissingSubscriptionID Missing subscription ID 400 NotExistDomainParkingRecord Not existing domain parking record 400 MissingDNSType Missing DNS Type 400 NotSupportedDNSType Not supported DNS type 400 MissingIP Missing IP address 400 InvalidIP Invalid IP address 400 MissingDomain Missing domain name 400 InvalidDomain Invalid domain name 400 MissingContent Missing content 400 InvalidContent Invalid content 400 MissingARecord Missing A record 400 InvalidARecord Invalid A record 400 MissingCName Missing CName 400 InvalidCName Invalid CName 400 MissingRecordName Missing record name 400 InvalidRecordName Invalid record name 400 DuplicateDNSRecord Duplicate DNS record 400 InvalidSubscriptionID Invalid subscription ID 400 SubscriptionExpired Plan expired 400 PlanNotFound The subscription plan not found 400 ExceedSubscriptionQuota Exceed the quota of the plan 400 FailCreateDNSRecord Fail to create DNS record 400

(30)

API ID

CDNS­GEN­0013 REST http method PUT

API Name dns_update_record API Type General API Description Update DNS record for cdns.mygrid.asia or parked domain REST URI http://a.cdns.mygrid.asia/dns_update_record/locale/en Input Parameters ­ Locale Code Note DNS Type : for cdns.mygrid.asia domain, support PA record only. for parked domain, support A, AAAA, CNAME, PA, and MX records. Input XML <UpdateDNSRecord>     <DNS_ID>UJ4BpIhiV0EWhNwr4NjfUVSSofYW8­5_auCvSXEXk</DNS_ID>     <NewRecord>  <NewDNSType>AAAA</NewDNSType>        (support A, AAAA, CNAME, PA or MX)         <NewRecordName>toy</NewRecordName>  <NewContent>fd0e:34b9:72cf:1778::2</NewContent>  <ChangeDescription>Y</ChangeDescription> (Y/N)  <NewDescription>It’s test.</NewDescription>     </NewRecord> </UpdateDNSRecord> Return http status

201

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code

InvalidChangeDescription Invalid “Change” description 400 NotExistDNSRecord Not exist DNS record 400 MissingDNSType Missing DNS Type 400 NotSupportedDNSType Not supported DNS type 400

(31)

InvalidIP Invalid IP address 400 MissingDomain Missing domain name 400 InvalidDomain Invalid domain name 400 MissingContent Missing content 400 InvalidContent Invalid content 400 MissingARecord Missing A record 400 InvalidARecord Invalid A record 400 MissingCName Missing CName 400 InvalidCName Invalid CName 400 MissingRecordName Missing record name 400 InvalidRecordName Invalid record name 400 DuplicateDNSRecord Duplicate DNS record 400 FailUpdateDNSRecord Fail to update DNS record 400

(32)

API ID

CDNS­GEN­0014 REST http method DELETE

API Name dns_delete_record

API Type General API

Description Delete DNS record

REST URI http://a.cdns.mygrid.asia/dns_remove_record/locale/en/dns_id/UJ4BpIhiV0EWhNwr4N

Input Parameters ­ Locale Code

­ 

DNS ID Note ­ Input XML No XML Return http status

200

Output for success case <CloudAPI>   <StatusCode>SuccessCall</StatusCode>   <Message>The request is run successfully.</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code

NotExistDNSRecord No such DNS record 400 FailRemoveDNSRecord Fail to remove DNS record 400

(33)

API ID

CDNS­GEN­0015 REST http method PUT

API Name dns_search_record API Type General API Description Search DNS record under cdns.mygrid.asia or parked domain REST URI http://a.cdns.mygrid.asia/dns_search_record/locale/en Input Parameters ­ Locale Code Note Iput the searching criteria in XML. If not enter value in XML, it will show out all records. Input XML <SearchDNS>     <DNS_ID></DNS_ID>     <DNS_Type></DNS_Type> (e.g. A, AAAA, CNAME, MX, PA)     <DNSName></DNSName>     <Content></Content>     <OwnerID></OwnerID>     <OwnerLogin></OwnerLogin>     <SearchByDomainType>G</SearchByDomainType> (Compulsory input) (G ­ cdns.mygrid.asia, PD ­ Parked Domain)     <SubscriptionID></SubscriptionID>     <ParkedDomainID></ParkedDomainID> </SearchDNS> Return http status

200

Output for success case <CloudDNS>   <Domain>cdns.pandev.mygrid.asia</Domain>   <DNSServer>ns1.mygrid.asia</DNSServer>   <SerialNO>2013030429</SerialNO>   <TotalDNSRecord>1</TotalDNSRecord>   <DNSList>     <DNSRecord>       <DNS_ID>Qx9Bzf5X2PpWPyGiE9r7I0clOYz7YvNHw9fTe_9fgyY</DNS_ID>       <DomainName>cdns.pandev.mygrid.asia</DomainName>       <RecordName>toy</RecordName>       <Type>PA</Type>       <Content>test123</Content>       <Description>test</Description>       <TTL>60</TTL> <MemberAccessID>6Igu5ccmk7AWYUkA5vkRi1WEiMEk58</MemberAccessID>       <MemberLogin>tommy</MemberLogin>       <LastUpdateDate>2013­03­07T07:56:21Z</LastUpdateDate>
(34)

<SubscriptionID>DLNIHapHhaDQKgCDssjglJhxnEO_HlA</SubscriptionID>       <PlanID>l0IHqWR­_VdK8acfJBmWJmWEp_R6IJi28GpFzVcOm80</PlanID>       <PlanName>Premium Plan B ­ 3 Month</PlanName>       <PlanDescription>Premium Plan B ­ 3 month</PlanDescription>       <SubscribeDate>2013­01­09T17:23:43Z</SubscribeDate>       <ExpiryDate>2013­10­09T17:23:46Z</ExpiryDate>       <IsExpired>N</IsExpired>       <IsSuspended>N</IsSuspended>       <SuspensionDate>2013­03­14T11:18:29Z</SuspensionDate>     </DNSRecord>   </DNSList> </CloudDNS> or show following if no record found <CloudAPI>   <StatusCode>NoRecordFound</StatusCode>   <Message>No record found</Message> </CloudAPI> Possible Errors

Error Code Error Description HTTP Status

Code

>www.abcdef.com

References

Related documents

Table 3 shows the results from the multilevel analysis predicting lifetime drunkenness. The empty model re- veals a little less than 5% of the variability in lifetime drunkenness

(including, but not limited to, the Domestic Violence Task Force, the Education Task Force, the Fair Park Task Force, the LGBT Task Force, the Transportation-for-Hire

[0042] At step 206, the agent server 110 connected to social networking server 102 at the request of the syndicate manager receives acceptance of the invitations to form the

Students report other benefits from presenting their work at an Undergraduate Research Conference (URC), such as the opportunity to present their work in front of peers and

P: Hear the prayer of your people, O Lord, that the lips which have praised you here may glorify you in the world, that the eyes which have seen the coming of your Son may long

information across interpersonal networks (family members, close friends, acquaintances, and health professionals) and Internet-based communication technologies (mobile apps,

(2001) used the finite element method (FEM) to find the attenuation characteristics of short elliptic chamber mufflers with center inlet and side outlet configurations..

Rahimi and Mehryar [34] numerically investigated variation of local Nusselt number along the two ends of circular micro pipe subjected to constant heat flux at its wall. Simulation