Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save oluwaseyeayinla/85a064e6b54aadf00e6cb2ceaf03dc06 to your computer and use it in GitHub Desktop.
Virtual Endpoint Execution
{
"active": true,
"allowed_ips": [],
"api_id": "ab3cc9c89aa1445389e7a0921a3321cb",
"auth_configs": {
"authToken": {
"auth_header_name": "Authorization"
}
},
"enable_context_vars": true,
"enable_ip_whitelisting": false,
"name": "Virtual Endpoint",
"protocol": "",
"proxy": {
"listen_path": "/virtual-endpoint/",
"strip_listen_path": true,
"target_url": "https://dummyjson.com/"
},
"slug": "virtual-endpoint",
"use_keyless": true,
"use_standard_auth": false,
"version_data": {
"default_version": "",
"not_versioned": true,
"versions": {
"Default": {
"expires": "",
"extended_paths": {
"do_not_track_endpoints": [],
"ignored": [],
"track_endpoints": [],
"virtual": [
{
"disabled": false,
"response_function_name": "TykIOMFCToken_2nd_code",
"function_source_type": "blob",
"function_source_uri": "ZnVuY3Rpb24gVHlrSU9NRkNUb2tlbl8ybmRfY29kZShyZXF1ZXN0LCBzZXNzaW9uLCBjb25maWcpIHsNCiAgcmF3bG9nKCIybmQgQ29kZSIpDQogIHZhciB1cmxFbmRwb2ludCA9ICJodHRwczovL2R1bW15anNvbi5jb20vaHR0cC8yMDAiOw0KICByYXdsb2coImVuZHBvaW50OiIrdXJsRW5kcG9pbnQpOw0KICByZXNwb25zZSA9IFR5a01ha2VIdHRwUmVxdWVzdCh1cmxFbmRwb2ludCk7DQogIGxvZygicmVzcG9uc2UgcmVzdWx0OiIrdHlwZW9mIHJlc3BvbnNlKTsNCiAgdmFyIHJlc3BvbnNlT2JqZWN0ID0gew0KICAgIEJvZHk6IEpTT04uc3RyaW5naWZ5KHsicmVzdWx0IHYxIjp0eXBlb2YgcmVzcG9uc2UsImV4ZWN1dGlvbiI6ImZyb20gZHVtbXlqc29uIn0pLA0KICAgIEhlYWRlcnM6IHsNCiAgICAgICJ4LXRlc3QiOiAidmlydHVhbC1oZWFkZXIiLA0KICAgICAgIngtdGVzdC0yIjogInZpcnR1YWwtaGVhZGVyLTIiDQogICAgfSwNCiAgICBDb2RlOiAyMDANCiAgfQ0KICByZXR1cm4gVHlrSnNSZXNwb25zZShyZXNwb25zZU9iamVjdCwgc2Vzc2lvbi5tZXRhX2RhdGEpIA0KfQ==",
"path": "/2nd_code",
"method": "GET",
"use_session": false,
"proxy_on_error": false
},
{
"disabled": false,
"response_function_name": "TykIOMFCToken_1st_code",
"function_source_type": "blob",
"function_source_uri": "ZnVuY3Rpb24gVHlrSU9NRkNUb2tlbl8xc3RfY29kZShyZXF1ZXN0LCBzZXNzaW9uLCBjb25maWcpIHsNCiAgcmF3bG9nKCIxc3QgQ29kZSIpDQogIG5ld1JlcXVlc3QgPSB7DQogICAgIk1ldGhvZCI6ICJHRVQiLA0KICAgICJCb2R5IjogIiIsDQogICAgIkRvbWFpbiI6ICJodHRwczovL2R1bW15anNvbi5jb20iLA0KICAgICJSZXNvdXJjZSI6ICIvaHR0cC8yMDAiLA0KICAgICJGb3JtRGF0YSI6IHt9DQogIH07DQogIHJlc3BvbnNlID0gVHlrTWFrZUh0dHBSZXF1ZXN0KEpTT04uc3RyaW5naWZ5KG5ld1JlcXVlc3QpKTsNCiAgcmF3bG9nKCJyZXNwb25zZSByZXN1bHQ6Iit0eXBlb2YgcmVzcG9uc2UpOw0KICB2YXIgcmVzcG9uc2VPYmplY3QgPSB7DQogICAgQm9keTogSlNPTi5zdHJpbmdpZnkoeyJyZXN1bHQgdjMiOnR5cGVvZiByZXNwb25zZSwiZXhlY3V0aW9uIjoiZnJvbSBkdW1teWpzb24ifSksDQogICAgSGVhZGVyczogew0KICAgICAgIngtdGVzdCI6ICJ2aXJ0dWFsLWhlYWRlciIsDQogICAgICAieC10ZXN0LTIiOiAidmlydHVhbC1oZWFkZXItMiINCiAgICB9LA0KICAgIENvZGU6IDIwMA0KICB9DQogIHJldHVybiBUeWtKc1Jlc3BvbnNlKHJlc3BvbnNlT2JqZWN0LCBzZXNzaW9uLm1ldGFfZGF0YSkgDQp9",
"path": "/1st_code",
"method": "GET",
"use_session": false,
"proxy_on_error": false
}
]
},
"global_headers": {},
"global_headers_remove": [],
"global_response_headers": {},
"global_response_headers_remove": [],
"global_size_limit": 0,
"ignore_endpoint_case": false,
"name": "Default",
"override_target": "",
"paths": {
"ignored": [],
"white_list": [],
"black_list": []
},
"use_extended_paths": true
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment