View glossary list
    • PDF

    View glossary list

    • PDF

    Article Summary

    Overview

    It is an API for viewing the glossary list.

    View glossary list

    API URL

    GET https://papago.apigw.ntruss.com/glossary/v1/?currentPage={page}&pageSize={size}
    

    Request headers

    Request header information is required when calling the API.
    For a detailed guide to request headers, see the Glossary overview.

    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    

    Request parameters

    Field nameTypeRequirement statusTypeDescription
    currentPagequery stringYesStringWhen searching the Glossary list multiple times in batches, you can call it page by page.
    pageSizequery stringYesStringIt means the number of glossaries to be searched. The default value is 20 and the maximum value is 30.
    Example: /glossary/v1/?currentPage=1&pageSize=10

    Request examples

    import hashlib
    import hmac
    import base64
    import time
    import requests
    
    
    def make_signature(access_key, secret_key, timestamp, url, method):
        timestamp = str(timestamp)
        secret_key = bytes(secret_key, 'UTF-8')
    
        message = method + " " + url + "\n" + timestamp + "\n" + access_key
        message = bytes(message, 'UTF-8')
        signingKey = base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest())
        return signingKey.decode('UTF-8')
    
    
    def get_user_glossary():
        baseurl = "https://papago.apigw.ntruss.com" #{OpenAPI endpoint}
        url = "/glossary/v1/?currentPage={}&pageSize={}"
    
        access_key = "DonNfVLUKOMNnmXXXXXX" #{Main / Sub Account Access Key}
        secret_key = "W5RyNUbIzOuUsEM8v8eqreMdSQZHMm9nfgXXXXXX" #{Main / Sub Account Secret Key}
        timestamp = int(time.time() * 1000)
        method = "GET"
        url = url.format(1, 10)  # {change {} in url to page number and page size.}
    
        signature = make_signature(access_key, secret_key, timestamp, url, method)
    
        url = baseurl + url
        headers = {
            "x-ncp-apigw-timestamp": str(timestamp),
            "x-ncp-iam-access-key": access_key,
            "x-ncp-apigw-signature-v2": str(signature)
        }
    
        response = requests.get(url=url, verify=True, headers=headers)
    

    Response examples

    json
        "data": [
            {
                "glossaryKey": "c26b6e45-437c-43ea-ae7f-22adb03f7eb0",
                "glossaryName": "Glossary1",
                "wordCount": 2,
                "description": "It describes Glossary1.",
                "createdDateTime": 1700024446000,
                "updatedDateTime": 1700025426000
            }
        ],
        currentPage": 1, "totalPage": 5, "currentGlossaryCount": 20, "totalGlossaryCount": 30
        }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.