let tokenUrl = pm.environment.get("TOKEN_URL");
let clientId = pm.environment.get("CLIENT_ID");
let clientSecret = pm.environment.get("CLIENT_SECRET");
let getTokenRequest = {
method: "POST",
url: token_URL,
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: {
mode: "urlencoded",
urlencoded: [
{ key: "grant_type", value: "client_credentials" },
{ key: "scope", value: "" },
{ key: "client_id", value: clientId },
{ key: "client_secret", value: clientSecret },
],
},
};
pm.sendRequest(getTokenRequest, (err, response) => {
let jsonResponse = response.json(),
accessToken = jsonResponse.access_token;
pm.environment.set("TOKEN", accessToken);
pm.variables.set("TOKEN", accessToken);
});
https://eu10.alm.cloud.sap/api/calm-analytics/v1/providers
https://eu10.alm.cloud.sap/api/calm-tasks/v1/tasks
https://eu10.alm.cloud.sap/api/calm-projects/v1/projects
[
{
"id": "35b22fcc-cd63-4d6f-97ba-3a2be95a7367",
"name": "Demo create with timebox",
"status": "C"
},
{
"id": "92adaa5a-2c76-48c5-8855-53efe3b8ec0d",
"name": "demo with ms",
"status": "O"
},
]
[
{
"id": "0034f9f2-b187-486b-8b97-92b349b19520",
"projectId": "35b22fcc-cd63-4d6f-97ba-3a2be95a7367",
"title": "Setup Project",
"type": "CALMTMPL",
"status": "CIPTKOPEN",
"externalId": null,
"dueDate": null
},
{
"id": "660a3ad4-5c2d-45ea-97d7-94f016502670",
"projectId": "35b22fcc-cd63-4d6f-97ba-3a2be95a7367",
"title": "Setup Central Business Configuration Integration (Optional)",
"type": "CALMTMPL",
"status": "CIPTKOPEN",
"externalId": null,
"dueDate": null
}
]
{
"format": "time_series",
"timeRange": {
"semantic":"L60D"
},
"queries": [
{
"name": "legend1",
"provider": "DEMO_TASKS",
"version":"V1",
"columns": {
"dimensions": [
"project"
],
"metrics": [
{
"measure": "Count"
}
]
},
"filters": [
{
"key":"project",
"value":["CRM"]
},
{
"key":"AggregatedStatus",
"value":["closed"]
}
]
}
]
}
[
[
{
"serieName": "legend1",
"totalCount": 2,
"group": "legend1",
"measure": "Count",
"attributes": [],
"dataPoints": [
[
0,
20210618000000
],
[
0,
20210617000000
]
],
"message": ""
}
]
]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
10 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 |