5 Change IP Family Preferences API

The Change IP family preferences API provides the REST APIs for migrating single stack to dual stack procedure.

Note:

The "base-uri" will be "<db-monitor-svc service name>.<namespace>:8080".

Note:

The namespace "occne-cndbtier" is given in the documentation only as an indicative purpose. Users must configure the name according to their environment.

Example:

$ curl -X POST http://base-uri/db-tier/api/v1/ip-family/switch/local/{localSiteName}/remote/{remoteSiteName}/preferred/{preferredIpFamily}/switch-over/{doSwitchOver}
$ curl -X POST http://base-uri/db-tier/api/v1/ip-family/switch/local/{localSiteName}/preferred/{preferredIpFamily}/switch-over/{doSwitchOver}
$ curl -X GET http://base-uri/db-tier/api/v1/ip-family/preference/status/local-site/{localSiteName}/cmd-ids/{cmdIds} 

5.1 Persist IP Family Preference Site to Site API

This API persists the preferred IP family configuration for Site to Site connectivity. It allows clients to save whether IPv4, IPv6, or a dual-stack preference should be used for Site-to-Site communication.

API Definition

URI: http://base-uri/db-tier/api/v1/ip-family/switch/local/{localSiteName}/remote/{remoteSiteName}/preferred/{preferredIpFamily}/switch-over/{doSwitchOver}

Method: POST

API Type: Realtime API

Request Payload Response Code Response Payload
NA 200 OK
{
  "preferredIpFamily": "IPv6",
  "details": {
    "localSiteName": "siteA",
    "remoteSiteName": "siteB",
    "replicationChannelGroupId": 1,
    "status": "CREATED",
    "commandId": 1212
  }
}
404 Not Found
{
  "title": "Not Found",
  "status": 404,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
400 Bad Request
{
  "title": "Bad Request",
  "status": 400,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
405 NOT_IMPLEMENTED
{
  "title": "NOT_IMPLEMENTED",
  "status": 405,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
500 Internal Server Error
{
  "title": "Internal Server Error",
  "status": 500,
   "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}

API Configuration

Field Description Details
localSiteName This attribute displays the local site name.

DataType: String

Constraints: NA

Default Value: NA

preferredIpFamily This attribute displays the preferredIpFamily type

DataType: String

Constraints: NA

Default Value: NA

commandId This attribute displays the command id

DataType: Long

Constraints: NA

Default Value: NA

status This attribute displays the command id status

DataType: String

Constraints: NA

Default Value: NA

remoteSiteName This attribute displays the remote site name.

DataType: String

Constraints: NA

Default Value: NA

replicationChannelGroupId This attribute displays the replication channel groupid

DataType: Long

Constraints: NA

Default Value: NA

doSwitchOver This attribute do the switch over

DataType: boolean

Constraints: NA

Default Value: NA

5.2 Persist IP Family Preference Site To All Sites API

This API persists the preferred IP family configuration for Site-to-All-Sites connectivity. It enables clients to save whether IPv4, IPv6, or dual-stack behavior should be used when a site communicates with all other connected sites.

API Definition

URI: http://base-uri/db-tier/api/v1/ip-family/switch/local/{localSiteName}/preferred/{preferredIpFamily}/switch-over/{doSwitchOver}

Method: POST

API Type: Realtime API

Request Payload Response Code Response Payload
NA 200 OK
{
  "preferredIpFamily": "IPv6",
  "details": {
    "localSiteName": "siteA",
    "remoteSiteName": "siteB",
    "replicationChannelGroupId": 1,
    "status": "CREATED",
    "commandId": 1212
  }
} 
404 Not Found
{
  "title": "Not Found",
  "status": 404,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
400 Bad Request
{
  "title": "Bad Request",
  "status": 400,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
405 NOT_IMPLEMENTED
{
  "title": "NOT_IMPLEMENTED",
  "status": 405,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
500 Internal Server Error
{
  "title": "Internal Server Error",
  "status": 500,
   "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}

API Configuration

Field Description Details
localSiteName This attribute displays the local site name.

DataType: String

Constraints: NA

Default Value: NA

preferredIpFamily This attribute displays the preferredIpFamily type

DataType: String

Constraints: NA

Default Value: NA

commandId This attribute displays the command id

DataType: Long

Constraints: NA

Default Value: NA

status This attribute displays the command id status

DataType: String

Constraints: NA

Default Value: NA

remoteSiteName This attribute displays the remote site name.

DataType: String

Constraints: NA

Default Value: NA

replicationChannelGroupId This attribute displays the replication channel groupid

DataType: Long

Constraints: NA

Default Value: NA

doSwitchOver This attribute do the switch over

DataType: boolean

Constraints: NA

Default Value: NA

5.3 Get Command Queue Status API

This API retrieves the current status of the command queue.

API Definition

URI: http://base-uri/db-tier/api/v1/ip-family/preference/status/local-site/{localSiteName}/cmd-ids/{cmdIds}

Method: GET

API Type: Realtime API

Request Payload Response Code Response Payload
NA 200 OK
[
  {
    "status": "CREATED",
    "cmdId": 1001
  }
]
404 Not Found
{
  "title": "Not Found",
  "status": 404,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
400 Bad Request
{
  "title": "Bad Request",
  "status": 400,
  "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}
500 Internal Server Error
{
  "title": "Internal Server Error",
  "status": 500,
   "detail": "<Exception details>",
  "cause": <cause>,
  "invalidParams": <params>
}

API Configuration

Field Description Details
localSiteName This attribute displays the local site name.

DataType: String

Constraints: NA

Default Value: NA

cmdIds This attribute displays the command id's

DataType: Long

Constraints: NA

Default Value: NA

cmdId This attribute displays the command id

DataType: Long

Constraints: NA

Default Value: NA

status This attribute displays the command id status

DataType: String

Constraints: NA

Default Value: NA