Get detailed information on your bespoke application by calling the core endpoint
Contents
Introduction
This endpoint uses a signed string to authenticate your connection. To help you to use the endpoint we have supplied a postman script to generate your signed string. This can be found here.
Resource URL
https://{MEDIACONTROLCENTRE_HOST}[:PORT]/core/v1/application
Resource Information
Parameters
None
Response
Returns the application details in XML format on success (OR JSON if your standard HTTP Accept header specified application/json). Returns standard error response on failure.
Pre-signed script
Add this pre-signed script to your postman collection or request.
// SET THE IMAGEN DATE HEADER AND GENERATE SIGNATURE
var headerDate = new Date().toUTCString();
pm.globals.set("apiDate", headerDate);
console.log(`Date header value: ${headerDate}`);
// Access the application secret
var secret = pm.globals.get("apiSecret");
// Use CryptoJS to create a signed hash
var hmac = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, secret);
// HTTP verb
hmac.update(pm.request.method + "\n");
// Content-Length (blank)
hmac.update("\n");
// Content-MD5 (blank)
hmac.update("\n");
// Content-Type (blank)
hmac.update("\n");
// Date
hmac.update(headerDate + "\n");
// Canonical resource
// Does not resolve variables in request path, so use literal path in request for the correct signature
// If you want to exclude query part, use pm.request.url.getPath() only
hmac.update(pm.request.url.getPathWithQuery())
var hash = hmac.finalize();
var signature = CryptoJS.enc.Base64.stringify(hash);
// Set the new variable
pm.globals.set("apiSignature", `HMAC-SHA256 ${signature}`);
console.log(`Signature header value: HMAC-SHA256 ${signature}`);
XML
Example Request - curl
curl --location --request GET 'https://{your_MCC_FQDN}:83/core/v1/application' \
--header 'X-Imagen-API-Key: snm***************qd3 ' \
--header 'X-Imagen-API-Signature: HMAC-SHA256 fDF*****************Q=' \
--header 'X-Imagen-Date: Wed, 06 Jul 2022 10:58:29 GMT' \
--header 'Accept: application/XML'
Example Response- XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Application>
<APIKey>snm**************m6d</APIKey>
<SecretAccessKey>AJ7*********************HH4</SecretAccessKey>
<Name>API Example</Name>
<Created>2022-04-19T09:58:38Z</Created>
<Enabled>1</Enabled>
<RedirectURI></RedirectURI>
<Contact>support@imagen.io</Contact>
<Website>imagen.io</Website>
<Description>This is an example application</Description>
<Logo></Logo>
<DeveloperEmail>superadmin@imagenevp.com</DeveloperEmail>
<ApplicationType>installed</ApplicationType>
<DatabaseID>1</DatabaseID>
<Scopes>
<Scope>
<Name>databases</Name>
<Description>Access all databases</Description>
</Scope>
<Scope>
<Name>readUsersData</Name>
<Description>View records, media and collections</Description>
</Scope>
<Scope>
<Name>modifyUsersData</Name>
<Description>View and modify records, media and collections</Description>
</Scope>
<Scope>
<Name>manageJobs</Name>
<Description>Manage all jobs and workflows</Description>
</Scope>
<Scope>
<Name>impersonateUsers</Name>
<Description>Impersonate users without an OAuth access token</Description>
</Scope>
<Scope>
<Name>roles</Name>
<Description>Search for any user or group</Description>
</Scope>
<Scope>
<Name>createJobs</Name>
<Description>Create and manage workflow jobs</Description>
</Scope>
<Scope>
<Name>files</Name>
<Description>Can manage Imagen StorageService files</Description>
</Scope>
<Scope>
<Name>modifyRoles</Name>
<Description>Modify users and email users</Description>
</Scope>
</Scopes>
</Application>
JSON
Example Request - curl
curl --location --request GET 'https://{your_imagen_MCC_FQDN}:83/core/v1/application' \
-header 'X-Imagen-API-Key: snm*************m6d ' \
--header 'X-Imagen-API-Signature: HMAC-SHA256 chX************************************o=' \
--header 'X-Imagen-Date: Wed, 06 Jul 2022 10:54:49 GMT' \
--header 'Accept: application/json'
Example Result - JSON
{
"Application": {
"APIKey": "snmfDDQ4bHnohZzKRm6d",
"SecretAccessKey": "AJ7O12BBKZ6DvN3bYjQm8iiOmujhG5YzIi7NoHH4",
"Name": "API Test",
"Created": "2022-04-19T09:58:38Z",
"Enabled": 1,
"RedirectURI": "",
"Contact": "martyn.double@imagen.io",
"Website": "",
"Description": "",
"Logo": "",
"DeveloperEmail": "superadmin@imagenevp.com",
"ApplicationType": "installed",
"DatabaseID": "1",
"Scopes": [
{
"Name": "databases",
"Description": "Access all databases"
},
{
"Name": "readUsersData",
"Description": "View records, media and collections"
},
{
"Name": "modifyUsersData",
"Description": "View and modify records, media and collections"
},
{
"Name": "manageJobs",
"Description": "Manage all jobs and workflows"
},
{
"Name": "impersonateUsers",
"Description": "Impersonate users without an OAuth access token"
},
{
"Name": "roles",
"Description": "Search for any user or group"
},
{
"Name": "createJobs",
"Description": "Create and manage workflow jobs"
},
{
"Name": "files",
"Description": "Can manage Imagen StorageService files"
},
{
"Name": "modifyRoles",
"Description": "Modify users and email users"
}
]
}
}