This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Domains in Bitly
Overview
The following operations allow you to work with Domain. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with domain, see Sample configuration.
Operation | Description |
---|---|
Query whether a given domain is a valid bitly pro domain | |
getTrackingDomainClicks | Returns the number of clicks on bitly links pointing to the specified tracking domain |
getTrackingDomainShortenCounts | Returns the number of links, pointing to a specified tracking domain, shortened in a given time period by all bitly users |
Operation details
This section provides further details on the operations related to Domain.
Get a valid bitly pro domain
The
getProDomain
operation checks query whether a given domain is a valid bitly pro domain.
<bitly.getProDomain> <domain>{$ctx:domain}</domain> <bitly.getProDomain/>
Properties
domain
: short domain.
Sample request
Following is a sample REST/JSON request that can be handled by the
getProDomain
operation.
{ "domain":"base64encode.org" }
Related Bitly documentation
http://dev.bitly.com/domains.html#v3_bitly_pro_domain
Get the number of clicks on bitly links pointing to the specified tracking domain
The getTrackingDomainClicks
operation Returns the number of clicks on bitly links pointing to the specified tracking domain .
<bitly.getTrackingDomainClicks> <trackingDomain>{$ctx:trackingDomain}</trackingDomain> <bitly.getTrackingDomainClicks/>
Properties
trackingDomain
: ta tracking domain as returned from /v3/user/tracking_domain_list
Sample request
Following is a sample REST/JSON request that can be handled by the
getTrackingDomainClicks
operation.
{ "trackingDomain":"base64encode.org" }
Related Bitly documentation
http://dev.bitly.com/domains.html#v3_user_tracking_domain_clicks
Get the number of links, pointing to a specified tracking domain, shortened in a given time period by all bitly users
The
getTrackingDomainShortenCounts
operation returns the number of links, pointing to a specified tracking domain, shortened in a given time period by all bitly users .
<bitly.getTrackingDomainShortenCounts> <trackingDomainforCount>{$ctx:trackingDomainforCount}</trackingDomainforCount> </bitly.getTrackingDomainShortenCounts>
Properties
trackingDomainforCount
: tracking domain as returned from /v3/user/tracking_domain_list.
Sample request
Following is a sample REST/JSON request that can be handled by the
getTrackingDomainShortenCounts
operation.
{ "trackingDomainforCount":"base64encode.org" }
Related Bitly documentation
http://dev.bitly.com/domains.html#v3_user_tracking_domain_shorten_counts
Sample configuration
Following is a sample proxy service that illustrates how to connect to Bitly with the init
operation and use the getProDomain
operation. The sample request for this proxy can be found in getProDomain sample request.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="bitly" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="bitlyLink" expression="json-eval($.bitlyLink)" /> <bitly.init> <accessToken>{$ctx:accessToken}</accessToken> </bitly.init> <bitlyUserName>{bitlyUser}</bitlyUserName> <expandUser>{expandUser}</expandUser> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>