Enables a simplified convenient authentication method for all APIs in the current API document to that will be used consumed internally within Joget, without requiring .
By enabling this, internally consumed APIs no longer require configuration from the Manage API Key Menu userview menu. This option allows a constant API key for convenient API calls within Joget context (example: writing AJAX API call in custom HTML), while still maintaining Instead, you can set a fixed internal API key that persists upon app import/export across different Joget instances.
Do note that API calls from an external environment still requires proper API key management via Manage API Key Menu userview menu for API calls from an external environment. Hence, persisting the same internal API key upon import/export app across different Joget instances.
Here is a sample script used internally in Joget that utilizes this feature:
Code Block |
---|
|
<script>
$(function(){
$.ajax({
url:'http://localhost:8080/jw/api/assignment/list',
dataType:'json',
async:true,
headers:{
api_id : 'yourApiDocIdHere',
api_key : 'yourInternalApiKeyHere'
},
type: 'GET',
success: function(req) {
console.log(req);
}
});
});
</script> |