This documentation is for WSO2 Private PaaS 4.1.0. View documentation for the latest release.
Deleting Domain Mappings - WSO2 Private PaaS 4.1.0 - WSO2 Documentation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
||
Skip to end of metadata
Go to start of metadata

You can get the details of the domain mappings using the CLI tool or REST API as shown below:

 

Deleting domain mappings via the CLI

Overview
CLI commandremove-domain-mappings
DescriptionRemove domain mappings of an application.
Command format
remove-domain-mappings <APPLICATION-ID>
Parameter definition
Short optionLong optionDescriptionRequiredExample value
N/AN/AID of the application.Yes
wso2am-190-application
Example

Remove domain mappings of the application with the ID: wso2am-190-application.

remove-domain-mappings wso2am-190-application
Sample output
 

Deleting domain mappings via the REST API

Overview
DescriptionDelete domain mappings of a cluster.
Resource Path

/applications/{applicationId}/domainMappings/{domainName}

HTTP MethodDELETE
Request/Response Format

application/json

Command format
curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://<STRATOS_HOST>:<STRATOS_HTTPS_PORT>/api/applications/{applicationId}/domainMappings/{domainName}
  • The path to the JSON file that defines the domain mapping that needs to be deleted needs to be defined as the <JSON_PAYLOAD> value.
  • By default, <USERNAME>:<PASSWORD> is admin:admin.
  • By default, <PRIVATE_PAAS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <PRIVATE_PAAS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
Example

Retrieve domain mapping details of the application with the ID: wso2am-190-application.

cd <PRIVATE_PAAS_CARTRIDGES>/wso2am/1.9.0/samples/applications/wso2am-190-application/artifacts/
curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/wso2am-190-application/domainMappings/abc.com
Sample output
 

You will come across the following HTTP status codes while deleting domain mappings:

HTTP status code

200, 500

See the descriptions of the HTTP status codes here.

 


 

 

  • No labels