Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello everyone
I want get data from open api.
I wrote the sample code with javascript in visual studio and finished test.
But, I don't know how to migrate in a Thingworx platform.
Please let me know, how to migrate in a thingworx platform and what should I refer for program syntax.
best regrard.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>API 연습</title>
</head>
<body>
<h1>Open Api Test</h1>
<p></p>
<script
src="https://code.jquery.com/jquery-3.6.0.js"
integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk="
crossorigin="anonymous"
></script>
<script>
$.ajax({
method : "GET",
url : "https://dapi.kakao.com/v3/search/book?target=title",
data : {query : "미움받을 용기" },
headers : {Authorization: "KakaoAK Myappkey"}
}).done(function (msg) {
console.log(msg);
console.log(msg.documents[0].title);
console.log(msg.documents[0].thumbnail);
$( "p" ).append( "<strong>" +msg.documents[0].title+ "</strong>" );
$( "p" ).append( "<img src=' "+msg.documents[0].thumbnail+ "'/>");
});
</script>
</body>
</html>
Solved! Go to Solution.
Hi,
A similar question was previously - "API documentation for JavaScript": https://community.ptc.com/t5/PTC-Education-Forum/API-documentation-for-JavaScript/td-p/515260
Some useful materials from "Help Center":
Hi,
A similar question was previously - "API documentation for JavaScript": https://community.ptc.com/t5/PTC-Education-Forum/API-documentation-for-JavaScript/td-p/515260
Some useful materials from "Help Center":
Thanks for your help.
You're welcome.