Get All URL List

GET Method

The API GET request enables you to get all the URLs created for a particular organization. You can specify title, to-date, and from-date as filters to get a more precise shortened URL list.

πŸ“˜

Note:

If you do not specify the details for which you wish to get the URL details, then all the details related to that URL appear, not in a precise way for that particular organization.

Request Format

To get all URL lists, use the following endpoint:

curl --location --request GET '<URL>/v1/<SID>/url-shortner?page=<PAGE>&from=<FROM-DATE>&to=<TO-DATE>&title=<TITLE>' \
--header 'api-key: <API-KEY>'

πŸ“˜

Note:

Ensure to replace the parameter values with the proper inputs in the above code.

Parameters and Variables

Following is the list of parameters and variables used:

Replace

Variable

Description

Example

Mandatory

URL

String

Base URL based on region.

https://api.xx.kaleyra.io

True

SID

String

Account SID (Security Identifier).

HXXXXXXX071US

True

PAGE

Number

The number of pages in which you wish to view the list.

One page can have a maximum of 25 records.

1

False

FROM

Date

The start date from which you wish to view records.

2022-02-07

False

TO

Date

The end date till which you wish to view records.

2022-02-20

False

TITLE

String

The title of records list you wish you to view.

KLR

False

API-KEY

Alphanumeric

API key generated from Kaleyra.io account.

Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3

True

Response Format

This section provides you with the success and failure JSON response format for different scenarios. Refer to the below sections for more information:
Sample Success Response
Sample Failure Response

Sample Success Response

The following is a sample success response:

{
    "code": "RBC103",
    "message": "Request successfully executed!",
    "data": [
        {
            "link_id": 317,
            "title": "URL Test1",
            "slug": "hfb",
            "long_url": "https://dxxxxd-cxxi.exxxxp.mxxxxxxxx.com",
            "advanced": 0,
            "link_type": "URL",
            "callback": "",
            "views": 100,
            "last_viewed": "2022-03-03 13:30:10",
            "status": 1,
            "created_at": "2022-03-03 18:53:57+05:30",
            "short_url": "https://klr.bz/hfb",
            "unique_clicks": 0
        },
        {
            "link_id": 316,
            "title": "URL Test2",
            "slug": "gfb",
            "long_url": "https://exxxxm-pxxa.lxxxxk.yxxxxxxxq.com",
            "advanced": 0,
            "link_type": "URL",
            "callback": "",
            "views": 0,
            "last_viewed": "",
            "status": 1,
            "created_at": "2022-03-03 18:09:13+05:30",
            "short_url": "https://klr.bz/gfb",
            "unique_clicks": 0
        }
    ],
    "error": {},
    "limit": "2",
    "offset": 0,
    "total": 24
}

Sample Failure Response

The following is the sample of failure responses:

{
    "code": "RBC183",
    "message": "Incorrect Date Format.Ex: YYYY-DD-MM",
    "data": [],
    "error": {
        "error": "Incorrect Date Format.Ex: YYYY-DD-MM"
    }
}
{
    "code": "RBC301",
    "message": "No Records Found",
    "data": [],
    "error": {}
}

Sample Request

curl --location --request GET 'https://api.xx.kaleyra.io/v1/HXXXXXXX071US/url-shortner?page=1&from=2022-02-07&to=2022-02-20&title=KLR' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3'

Did this page help you?