API Endpoint: https://api-shorturl.nhncloudservice.com
[URL]
POST /open-api/v1.0/appkeys/{appKey}/urls
Content-Type: application/json
[Path Variables]
Name | Type | Required | Description |
---|---|---|---|
appKey | String | O | Service Appkey (Can be found on the Manage Service tab) |
[Request Body]
Name | Type | Required | Description |
---|---|---|---|
url | String | O | Full URL |
domain | String | X | The domain to use for shortened URL (created as nh.nu if not specified) |
backHalf | String | X | Shortened URL ID (Refers to example in https://nh.nu/example. Created randomly if not specified) |
description | String | X | Description of shortened URL |
campaigns | List |
X | List of campaign IDs to belong to |
startDateTime | String | X | Date and time to start using shortURL |
endDateTime | String | X | Date and time to end the use of shortUrl |
{
"url": "https://nhn.com",
"domain": "nh.nu",
"campaigns": [1,2],
"backHalf": "example",
"description": "test",
"startDateTime" : "2022-11-10T02:58Z",
"endDateTime": "2100-02-10T02:58Z"
}
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"shortUrl": "http://nh.nu/example",
"originUrl": "https://nhn.com",
"status": "ACTIVE",
"backHalfType": "CUSTOM",
"description": "test",
"startDateTime" : "2022-11-10T02:58Z",
"endDateTime": "2100-02-10T02:58Z"
}
}
Name | Type | Description |
---|---|---|
header.isSuccessful | Boolean | Successful or not |
header.resultCode | Integer | Result code |
header.resultMessage | String | Failure message |
body.shortUrl | String | Shortened URL |
body.originUrl | String | Full URL |
body.status | String | Shortened URL status |
body.backHalfType | String | Method of creating the shortened URL |
body.description | String | Description of shortened URL |
body.startDateTime | String | Date and time to start using the shortened URL |
body.endDateTime | String | Date and time to end the use of the shortened URL |
https://nhn.com?query=안+녕
is converted to https://nhn.com?query=%EC%95%88+%EB%85%95
and the character +
is not encoded separately as %2B
.[URL]
GET /open-api/v1.0/appkeys/{appKey}/domains/{domain}/urls/{backHalf}
[Path Variables]
Name | Type | Required | Description |
---|---|---|---|
appKey | String | O | Service Appkey (Can be found on the Manage Service tab) |
domain | String | O | Domain name |
backHalf | String | O | Shortened URL path ID |
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"shortUrl": "http://nh.nu/a",
"originUrl": "https://nhn.com",
"status": "ACTIVE",
"backHalfType": "AUTO",
"description": "test",
"startDateTime": "2021-03-26T03:35+0000",
"endDateTime": "9999-12-31T00:00+0000"
}
}
Name | Type | Description |
---|---|---|
header.isSuccessful | Boolean | Successful or not |
header.resultCode | Integer | Result code |
header.resultMessage | String | Failure message |
body.shortUrl | String | Shortened URL |
body.originUrl | String | Full URL |
body.status | String | Shortened URL status |
body.backHalfType | String | Method of creating the shortened URL |
body.description | String | Description of shortened URL |
body.startDateTime | String | Date and time to start using the shortened URL |
body.endDateTime | String | Date and time to end the use of the shortened URL |
[URL]
GET /open-api/v1.0/appkeys/{appKey}/domains/{domain}/urls/{backHalf}/qrcode
[Path Variables]
Name | Type | Required | Description |
---|---|---|---|
appKey | String | O | Service Appkey (Can be found on the Manage Service tab) |
domain | String | O | Domain name |
backHalf | String | O | Shortened URL path ID |
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": "iVBORw0KGgoAAAANSUhEUgAAAIIAAACCAQAAAACieC1QAAAA+0lEQVR4Xu3UsZHEIAwFUO0QkO024BnaIKMlbwNnuwHTkjO3wYwasDMCBp18wbHrxFJ6t4rMCzTigwE61QIf+ZOSAGizNILRCFIuj0yRPzQyeqoeZ9AKVjB6ScN66nMtlGmD0y4uhfPB2eN7Ypdy1JSPpUbSsHTPTNXqBEL6CtCDU8kdMC4urm0XAqGJuA+N9jcfiZS7L73FqaUqkfRcu4HMTk4jPHDpvdvbzCKpgcd2fIgq2Xx342w9aeSnlcWqk+OOcThzS1UifJ95aWpoO5UI/6ezB3h5E2TCb0J5vKQqExoD7rnNLBHK6ZaRUSNHPnExcVXJW33kX8g3k5xLHpTtgoMAAAAASUVORK5CYII="
}
Name | Type | Description |
---|---|---|
header.isSuccessful | Boolean | Successful or not |
header.resultCode | Integer | Failure Code (0: Normal) |
header.resultMessage | String | Failure message |
body | String | Base64-encoded PNG image |