POST api/shorturl/generate
Request Information
URI Parameters
None.
Body Parameters
GenerateRequetObject| Name | Description | Type | Additional information |
|---|---|---|---|
| header | GenerateRequestHeaderObject |
None. |
|
| body | GenerateRequestBodyObject |
None. |
Request Formats
application/json, text/json
Sample:
{
"header": {
"tokenID": "sample string 1"
},
"body": {
"targetURL": "sample string 1"
}
}
application/xml, text/xml
Sample:
<GenerateRequetObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ShortUrlApplication.API.Models">
<body>
<targetURL>sample string 1</targetURL>
</body>
<header>
<tokenID>sample string 1</tokenID>
</header>
</GenerateRequetObject>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
GenerateResponseObject| Name | Description | Type | Additional information |
|---|---|---|---|
| header | GenerateResponseHeaderObject |
None. |
|
| body | GenerateResponseBodyObject |
None. |
Response Formats
application/json, text/json
Sample:
{
"header": {
"resultCode": "sample string 1",
"resultMessage": "sample string 2"
},
"body": {
"shortURL": "sample string 1"
}
}
application/xml, text/xml
Sample:
<GenerateResponseObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ShortUrlApplication.API.Models">
<body>
<shortURL>sample string 1</shortURL>
</body>
<header>
<resultCode>sample string 1</resultCode>
<resultMessage>sample string 2</resultMessage>
</header>
</GenerateResponseObject>