Skip to content

Exposed endpoints

David Chau edited this page Jul 3, 2018 · 12 revisions

Using the SDK enables several REST points on your connector application. Some of these endpoints delegates the logic to handlers that needs to be properly implemented in the connector.

  • GET /health Returns a 200 (Success) HTTP code. Used to verify that the server is up

  • GET /info Returns information about the deployed application. The information returned varies according to the configuration of the client application. Currently we've confirmed that if there is a git.properties file in the classpath, generated by the git commit id maven plugin, you'll get output like:

    {
    	"git": {
    		"commit": {
    			"time": "2016-11-07T18:05:22.000+0000",
    			"id": "2940352"
    		},
    		"branch": "bugfix/HTTPSigInConnector"
    	}
    }
    
  • GET /api/v1/integration/processEvent?eventUrl=[insert-event-callback-url-here] That is the endpoint where the appmarket sends event notifications

  • POST /api/v1/domainassociation/customers/{customerIdentifier}/domains The Content-Type header should be set to application/json and the Body should look like:

{
    "domainName": "example.com"
}
  • DELETE /api/v1/domainassociation/customers/{customerIdentifier}/domains/{domainName}

  • GET /api/v1/domainassociation/customers/{customerIdentifier}/domains/{domain}/ownershipProofRecord Response would look like:

{
    "txt" : [
        {
            "name" : "someName",
            "ttl" : 3600,
            "text" : "key=value" 
        }
    ],
    "mx" : [
        {
            "destinationDomain" : "example.com",
            "ttlInSeconds" : 60,
            "preferenceNumber" : 5,
            "mailServerName" : "aServer@example.com"
        }
    ]
}

[Deprecated, Use the /api/v1/domainassociation/customers/{customerIdentifier}/domains/{domain}/dns?type= ownershipProof in stead]

  • GET /api/v1/domainassociation/customers/{customerIdentifier}/domains/{domain}/dns?type={type} The type can be either ownershipProof or configuration. Response would look like:
{
    "txt" : [
        {
            "name" : "someName",
            "ttl" : 3600,
            "text" : "key=value" 
        }
    ],
    "mx" : [
        {
            "destinationDomain" : "example.com",
            "ttlInSeconds" : 60,
            "preferenceNumber" : 5,
            "mailServerName" : "aServer@example.com"
        }
    ],
    "cname": [
        {
            "name":"www",
            "alias":"@"
         }
    ],
    "srv":   [
         {
            "name":"ad.example.com",
            "service":"sip",
            "protocol":"tcp",
            "port":"5050",
            "weight":"60"
         }
    ]
}
  • GET /api/v1/domainassociation/customers/{customerIdentifier}/domains/{domain}/ownershipVerification?callbackUrl={callbackUrl}

  • POST /unsecured/integration/orderValidation The Content-Type header should be set to application/x-www-form-urlencoded and the Body should look like:

firstName=john&lastName=doe&address1=street1&address2=street2&city=City&state=State&country=US&postalCode=12345&email=test@email.com&phoneNumber=5555555555

The result will be a list of errors each described by a field, a title, a description and a level. Example:

{
    "result": [
        {
            "field": "city",
            "title": "Error on field: city",
            "description": "Field has invalid characters",
            "level": "ERROR"
        }
    ]
}

Note that the SDK includes the spring-boot-starter-actuator, which means several more endpoints are exposed automatically by Spring. For more information review the documentation here

Clone this wiki locally