API - Documentation

Authentication

API Base URL

    https://apidiscovery.teejlab.com/edsn/api/
            

The TeejLab APIDiscovery API uses api-key to authenticate all API requests.

Please log in and check your api_key

Endpoint Request


# Here is a curl example
curl -X POST \
  'https://apidiscovery.teejlab.com/edsn/api/
  endpoint_request_test?endpoint_id=14' \
  -H 'password: ******' \
  -H 'username: ******' \
  -d '{"i":"canada","timeout":"5"}'
            

To get the response, you need to make a POST call to the following url :
POSThttps://apidiscovery.teejlab.com/edsn/api/endpoint_request_test



Result example :

"Canada is a country in the northern part of North America."

            

PARAMETERS

Field Placement Description Required
endpoint_id Query String the id of the endpoint you would like to consume True
Parameters for the target API Body It should be in JSON format True

Endpoint list


# Here is a curl example
curl -X GET \
  'https://apidiscovery.teejlab.com/edsn/api/endpoint_list' \
            

To get the response, you need to make a GET call to the following url :
GEThttps://apidiscovery.teejlab.com/edsn/api/endpoint_list



Result example :

[
    {
        "id": 21,
        "endpoint": "http://api.openweathermap.org/data/2.5/weather",
        "method": "get",
        "description": "Access current weather data for any location on Earth including over 200,000 cities."
    },
    {
        "id": 16,
        "endpoint": "http://api.wolframalpha.com/v1/result",
        "method": "get",
        "description": "The Short Answers API returns a single plain text result directly from Wolfram|Alpha. In general, this text is taken directly from the Result pod of Wolfram|Alpha output. This API type is designed to deliver brief answers in the most basic format possible."
    }
]

            

PARAMETERS

Field Placement Description Required
N/A N/A N/A True

Endpoint Parameter


# Here is a curl example
curl -X GET \
  'https://apidiscovery.teejlab.com/edsn/api/endpoint_parameter' \
  -H 'password: ******' \
  -H 'username: ******' \
            

To get the response, you need to make a GET call to the following url :
GEThttps://apidiscovery.teejlab.com/edsn/api/endpoint_parameter



Result example :

{
    "parameter": [
        {
            "parameter_example_value": "5",
            "is_required": false,
            "parameter_default_value": "5",
            "parameter_placement": "query",
            "parameter_name": "timeout",
            "parameter_description": "Specifies the maximum amount of time (in seconds) allowed to process the query, with a default value of \"5\". Although it is primarily used to optimize response times in applications, the timeout parameter may occasionally affect what value is returned by the Short Answers API."
        }
    ],
    "description": "The Short Answers API returns a single plain text result directly from Wolfram|Alpha. In general, this text is taken directly from the Result pod of Wolfram|Alpha output. This API type is designed to deliver brief answers in the most basic format possible.",
    "endpoint_name": "http://api.wolframalpha.com/v1/result",
    "method": "get"
}

            

PARAMETERS

Field Placement Description Required
endpoint_id Query String the id of the endpoint True

Endpoint Example


# Here is a curl example
curl -X GET \
  'https://apidiscovery.teejlab.com/edsn/api/data_example?endpoint_id=14' \
  -H 'password: ******' \
  -H 'username: ******' \
            

To get the response, you need to make a GET call to the following url :
GEThttps://apidiscovery.teejlab.com/edsn/api/data_example



Result example :

{
    "output_response": "Canada is a country in the northern part of North America." ,
    "endpoint_id": "14",
    "input_parameters": {
        "i": "Canada",
        "timeout": "5"
    }
}

            

PARAMETERS

Field Placement Description Required
endpoint_id Query String the id of the endpoint True

Upload Swagger


    # Here is a curl example
    curl -X POST \
    'https://apidiscovery.teejlab.com/edsn/api/upload_swagger' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -H 'api-key: *************************' \
    -H 'vendor=Test_org_vendor' \
    -H 'category=Finance & Banking' \
    -F 'file=@/Users/Downloads/swagger.json' \

            

To get the response, you need to make a POST call to the following url :
POSThttps://apidiscovery.teejlab.com/edsn/api/upload_swagger



    Result example :

    {"info": "", "result": "Success"}

                

PARAMETERS

Field Placement Description Required
Content-Type header This value should be application/x-www-form-urlencoded True
file form-data / body the swagger file True
vendor header the name of vendor True
category header the name of category True

Get all Vendors in NIST CVE


# Here is a curl example
curl --location --request GET 'https://apidiscovery.teejlab.com/edsn/api/cvesearch/vendors/' \
--header 'Authorization: Basic abcdefgh'
            

To get the response, you need to make a GET call to the following url :
GEThttps://apidiscovery.teejlab.com/edsn/api/cvesearch/vendors/



Result example :

{
    "vendors": [
        "priorswood",
        "clever_components",
        "todoomasters",
        "overlay_weaver",
        "dominic_gamble",
        "foxmail",
        "niushop",
        "redirection",
        .....
    ]
}

            

PARAMETERS

Field Placement Description Required
N/A N/A N/A True

Get all products for a vendor


# Here is a curl example
curl --location --request GET 'https://apidiscovery.teejlab.com/edsn/api/cvesearch/vendor/products?vendor=Microsoft' \
--header 'Authorization: Basic abcdefgh'
            

To get the response, you need to make a GET call to the following url :
GEThttps://apidiscovery.teejlab.com/edsn/api/cvesearch/vendor/products



Result example :
{
    "products": [
        "office",
        "wins",
        "active_directory_lightweight_directory_service",
        "adam",
        "organization_chart",
        "windows_2003_server",
        "sql_server_2016",
        "security_essentials",
        "microsoft.aspnetcore.mvc.webapicompatshim",
        "office_communicator",
        "sharepoint_enterprise_server",
        "forefront_endpoint_protection",
        "office_word_viewer",
        "digital_image",
        "web_applications",
        "windows_data_access_components",
        "host_integration_server_2000",
        .......
    ]
}
            

PARAMETERS

Field Placement Description Required
vendor URL query parameter Vendor name True

Get all products asscociated with a CVE ID


# Here is a curl example
curl --location --request GET 'https://apidiscovery.teejlab.com/edsn/api/cvesearch/cve/products?cve_id=CVE-2012-1180' \
--header 'api-key: **************'
            

To get the response, you need to make a GET call to the following url :
GEThttps://apidiscovery.teejlab.com/edsn/api/cvesearch/cve/products



Result example :
{
    "associated_products": [
        "nginx nginx 0.1.0",
        "nginx nginx 0.1.1",
        "nginx nginx 0.1.2",
        "nginx nginx 0.1.3",
        "nginx nginx 0.1.4",
        "nginx nginx 0.1.5",
        "nginx nginx 0.1.6",
        "nginx nginx 0.1.7",
        "nginx nginx 0.1.8",
        "nginx nginx 0.1.9",
        "nginx nginx 0.1.10",
        "nginx nginx 0.1.11",
        "nginx nginx 0.1.12",
        "nginx nginx 0.1.13",
        "nginx nginx 0.1.14",
        .....
    ]
}

            

PARAMETERS

Field Placement Description Required
cve_id URL query parameter Given CVE ID True








Lack Resources Rate Limit Test


# Here is a curl example
curl -X POST \
  https://apidiscovery.teejlab.com/edsn/api/lack_resources_rate_limiting \
  -H 'api-key: ************************' \
  -H 'content-type: multipart/form-data;' \
  -F endpoint_id=22
            

To make the test, you need to make a POST call to the following url :
POSThttps://apidiscovery.teejlab.com/edsn/api/
lack_resources_rate_limiting



Result example :

{
    "result": "Added successfully. Please check the result later.",
    "info": 22
}

            

PARAMETERS

Field Placement Description Required
endpoint_id Request Body the id of the endpoint True








Lack Resources Rate Limit results


# Here is a curl example
curl -X POST \
  https://apidiscovery.teejlab.com/edsn/api/lack_resources_rate_limiting_check \
  -H 'api-key: ************************' \
  -H 'content-type: multipart/form-data;' \
  -F endpoint_id=22
            

To make the test, you need to make a POST call to the following url :
POST https://apidiscovery.teejlab.com/edsn/api/lack_resources_rate_limiting_check



Result example :

{
    "datetime": "06/02/2020",
    "result": "the API server does not have a limitation",
    "test_case": "5 requests in total  ,  58.32 requests per second"
}

            

PARAMETERS

Field Placement Description Required
endpoint_id Request Body the id of the endpoint True