{ "info": { "_postman_id": "6b0b564d-6329-485f-b880-0c9b336cafd7", "name": "Steampunk-Helper-Lib", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "8114323" }, "item": [ { "name": "Get Travel App metadata OData v2", "event": [ { "listen": "test", "script": { "exec": [ "pm.collectionVariables.set(\"csrf-token\", pm.response.headers.get(\"x-csrf-token\"));\r", "pm.collectionVariables.set(\"ETag\", pm.response.headers.get(\"ETag\"));" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-CSRF-Token", "value": "Fetch", "type": "text" } ], "url": { "raw": "https://{{steampunk-domain}}.abap.eu20.hana.ondemand.com/sap/opu/odata/sap/ZEVENT_UI_BOOKING_ODATA_V2/$metadata", "protocol": "https", "host": [ "{{steampunk-domain}}", "abap", "eu20", "hana", "ondemand", "com" ], "path": [ "sap", "opu", "odata", "sap", "ZEVENT_UI_BOOKING_ODATA_V2", "$metadata" ], "query": [ { "key": "$select", "value": "FirstName,EMailAddress,CountryCode,City,to_Country/IsEuropeanUnionMember", "disabled": true }, { "key": "$expand", "value": "to_Country", "disabled": true } ] } }, "response": [] }, { "name": "Get Travel Status", "event": [ { "listen": "test", "script": { "exec": [ "pm.collectionVariables.set(\"csrf-token\", pm.response.headers.get(\"x-csrf-token\"));\r", "pm.collectionVariables.set(\"ETag\", pm.response.headers.get(\"ETag\"));" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "", "type": "string" }, { "key": "username", "value": "EXCELODATAUSER", "type": "string" } ] }, "method": "GET", "header": [ { "key": "X-CSRF-Token", "value": "Fetch", "type": "text" } ], "url": { "raw": "https://{{steampunk-domain}}.abap.eu20.hana.ondemand.com/sap/opu/odata/sap/ZEVENT_UI_BOOKING_ODATA_V2/BOOKING(TravelID='10000',IsActiveEntity=true)?$format=json", "protocol": "https", "host": [ "{{steampunk-domain}}", "abap", "eu20", "hana", "ondemand", "com" ], "path": [ "sap", "opu", "odata", "sap", "ZEVENT_UI_BOOKING_ODATA_V2", "BOOKING(TravelID='10000',IsActiveEntity=true)" ], "query": [ { "key": "$select", "value": "FirstName,EMailAddress,CountryCode,City,to_Country/IsEuropeanUnionMember", "disabled": true }, { "key": "$expand", "value": "to_Country", "disabled": true }, { "key": "$format", "value": "json" } ] } }, "response": [] }, { "name": "Update TravelProcessor", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-CSRF-Token", "value": "{{csrf-token}}", "type": "text" }, { "key": "If-Match", "value": "{{ETag}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"Description\": \"UPDATED!\",\r\n \"TotalPrice\": \"999\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{steampunk-domain}}.abap.eu20.hana.ondemand.com/sap/opu/odata/sap/ZUI_C_TRAVEL_M_100/TravelProcessor(guid'02d5290e-594c-1eda-9381-5057fd946624')", "protocol": "https", "host": [ "{{steampunk-domain}}", "abap", "eu20", "hana", "ondemand", "com" ], "path": [ "sap", "opu", "odata", "sap", "ZUI_C_TRAVEL_M_100", "TravelProcessor(guid'02d5290e-594c-1eda-9381-5057fd946624')" ] } }, "response": [] }, { "name": "Update TravelProcessor complete", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "X-CSRF-Token", "value": "{{csrf-token}}", "type": "text" }, { "key": "If-Match", "value": "{{ETag}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"__metadata\": {\r\n \"id\": \"\",\r\n \"uri\": \"\",\r\n \"type\": \"\",\r\n \"etag\": \"\"\r\n },\r\n \"TravelUUID\": \"02d5290e-594c-1eda-9381-5057fd946624\",\r\n \"TravelID\": \"22\",\r\n \"AgencyID\": \"70001\",\r\n \"AgencyName\": \"Sunshine Travel\",\r\n \"CustomerID\": \"77\",\r\n \"CustomerName\": \"Neubasler\",\r\n \"BeginDate\": \"/Date(1561334400000)/\",\r\n \"EndDate\": \"/Date(1561680000000)/\",\r\n \"TotalPrice\": \"999.00\",\r\n \"CurrencyCode\": \"USD\",\r\n \"TravelStatus\": \"A\",\r\n \"Description\": \"UPDATED!\",\r\n \"LastChangedAt\": \"/Date(1687250515904+0000)/\"\r\n }", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{steampunk-domain}}.abap.eu20.hana.ondemand.com/sap/opu/odata/sap/ZUI_C_TRAVEL_M_100/TravelProcessor(guid'02d5290e-594c-1eda-9381-5057fd946624')", "protocol": "https", "host": [ "{{steampunk-domain}}", "abap", "eu20", "hana", "ondemand", "com" ], "path": [ "sap", "opu", "odata", "sap", "ZUI_C_TRAVEL_M_100", "TravelProcessor(guid'02d5290e-594c-1eda-9381-5057fd946624')" ] } }, "response": [] }, { "name": "Get Bookings OData v4", "event": [ { "listen": "test", "script": { "exec": [ "pm.collectionVariables.set(\"csrf-token\", pm.response.headers.get(\"x-csrf-token\"));\r", "pm.collectionVariables.set(\"ETag\", pm.response.headers.get(\"ETag\"));" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "B$Wjr%@o+sI5,gB=Uj5p", "type": "string" }, { "key": "username", "value": "EXCELODATAUSER", "type": "string" } ] }, "method": "GET", "header": [ { "key": "X-CSRF-Token", "value": "Fetch", "type": "text" } ], "url": { "raw": "https://{{steampunk-domain}}.abap.eu20.hana.ondemand.com/sap/opu/odata4/sap/zevent_ui_booking_04_0000/srvd/sap/zevent_ui_booking_0000/0001/BOOKING(TravelID='10000',IsActiveEntity=true)", "protocol": "https", "host": [ "{{steampunk-domain}}", "abap", "eu20", "hana", "ondemand", "com" ], "path": [ "sap", "opu", "odata4", "sap", "zevent_ui_booking_04_0000", "srvd", "sap", "zevent_ui_booking_0000", "0001", "BOOKING(TravelID='10000',IsActiveEntity=true)" ] } }, "response": [] }, { "name": "Change Booking", "event": [ { "listen": "test", "script": { "exec": [ "pm.collectionVariables.set(\"csrf-token\", pm.response.headers.get(\"x-csrf-token\"));\r", "pm.collectionVariables.set(\"ETag\", pm.response.headers.get(\"ETag\"));" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "", "type": "string" }, { "key": "username", "value": "BOOKING_APPROVER", "type": "string" } ] }, "method": "PATCH", "header": [ { "key": "X-CSRF-Token", "value": "{{csrf-token}}", "type": "text" }, { "key": "If-Match", "value": "{{ETag}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"OverallStatus\":\"A\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{steampunk-domain}}.abap.eu20.hana.ondemand.com/sap/opu/odata4/sap/zevent_ui_booking_04_100/srvd/sap/zevent_ui_booking_100/0001/BOOKING(TravelID='1',IsActiveEntity=true)", "protocol": "https", "host": [ "{{steampunk-domain}}", "abap", "eu20", "hana", "ondemand", "com" ], "path": [ "sap", "opu", "odata4", "sap", "zevent_ui_booking_04_100", "srvd", "sap", "zevent_ui_booking_100", "0001", "BOOKING(TravelID='1',IsActiveEntity=true)" ] } }, "response": [] }, { "name": "Query Bookings via GraphQL using Azure APIM", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "", "type": "string" }, { "key": "username", "value": "APIMDEMO", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{Ocp-Apim-Subscription-Key}}", "type": "text" } ], "body": { "mode": "graphql", "graphql": { "query": "query getBooking ($travelId: String!){\r\n getBooking(TravelID: $travelId) {\r\n Description\r\n OverallStatus\r\n TravelID\r\n }\r\n}", "variables": "{\r\n \"travelId\":\"10000\"\r\n}" } }, "url": { "raw": "https://{{azure-apim-host}}/graphql/to/sap/odata", "protocol": "https", "host": [ "{{azure-apim-host}}" ], "path": [ "graphql", "to", "sap", "odata" ] } }, "response": [] }, { "name": "Update Bookings via GraphQL using Azure APIM", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "", "type": "string" }, { "key": "username", "value": "APIMDEMO", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{Ocp-Apim-Subscription-Key}}", "type": "text" } ], "body": { "mode": "graphql", "graphql": { "query": "mutation($travelId: ID!) {\r\n\tupdateBooking(input: { TravelID: $travelId, Description: \"Vacation needed!\", OverallStatus: \"A\" })\r\n}", "variables": "{\r\n \"travelId\":\"10000\"\r\n}" } }, "url": { "raw": "https://{{azure-apim-host}}/graphql/to/sap/odata", "protocol": "https", "host": [ "{{azure-apim-host}}" ], "path": [ "graphql", "to", "sap", "odata" ] } }, "response": [] }, { "name": "Get Entra ID token for Azure Blob Storage", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(pm.info.requestName, () => {\r", " pm.response.to.not.be.error;\r", " pm.response.to.not.have.jsonBody('error');\r", "});\r", "pm.collectionVariables.set(\"EntraIdBearerToken\", pm.response.json().access_token);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{EntraIDClientSecret}}", "type": "string" }, { "key": "username", "value": "{{EntraIDClientId}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "scope", "value": "https://storage.azure.com/.default", "type": "text" } ] }, "url": { "raw": "https://login.microsoftonline.com/{{EntraIDTenantId}}/oauth2/v2.0/token", "protocol": "https", "host": [ "login", "microsoftonline", "com" ], "path": [ "{{EntraIDTenantId}}", "oauth2", "v2.0", "token" ] } }, "response": [] }, { "name": "PUT Azure Blob from steampunk via SAS", "request": { "auth": { "type": "noauth" }, "method": "PUT", "header": [ { "key": "x-ms-blob-type", "value": "BlockBlob", "type": "text" } ], "body": { "mode": "raw", "raw": "{\"key\":\"hello Azure world from SAP steampunk!\"}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{AzureStorageAccountName}}.blob.core.windows.net/{{AzureBlobContainerName}}/{{AzureBlobName}}?{{AzureBlobSAS}}", "protocol": "https", "host": [ "{{AzureStorageAccountName}}", "blob", "core", "windows", "net" ], "path": [ "{{AzureBlobContainerName}}", "{{AzureBlobName}}" ], "query": [ { "key": "{{AzureBlobSAS}}", "value": null } ] } }, "response": [] }, { "name": "PUT Azure Blob from steampunk via Entra", "request": { "auth": { "type": "noauth" }, "method": "PUT", "header": [ { "key": "x-ms-blob-type", "value": "BlockBlob", "type": "text" }, { "key": "Authorization", "value": "Bearer {{EntraIdBearerToken}}", "type": "text" }, { "key": "x-ms-version", "value": "2023-08-03", "type": "text" } ], "body": { "mode": "raw", "raw": "{\"key\":\"hello Azure world from SAP steampunk!\"}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{AzureStorageAccountName}}.blob.core.windows.net/{{AzureBlobContainerName}}/{{AzureBlobName}}", "protocol": "https", "host": [ "{{AzureStorageAccountName}}", "blob", "core", "windows", "net" ], "path": [ "{{AzureBlobContainerName}}", "{{AzureBlobName}}" ] } }, "response": [] }, { "name": "GET Azure Blob from steampunk via Entra ID", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "x-ms-version", "value": "2023-08-03", "type": "text" }, { "key": "Authorization", "value": "Bearer {{EntraIdBearerToken}}", "type": "text" } ], "url": { "raw": "https://{{AzureStorageAccountName}}.blob.core.windows.net/{{AzureBlobContainerName}}/{{AzureBlobName}}", "protocol": "https", "host": [ "{{AzureStorageAccountName}}", "blob", "core", "windows", "net" ], "path": [ "{{AzureBlobContainerName}}", "{{AzureBlobName}}" ] } }, "response": [] } ], "auth": { "type": "basic", "basic": [ { "key": "password", "value": "", "type": "string" }, { "key": "username", "value": "EXCELODATAUSER", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "steampunk-domain", "value": "", "type": "string" }, { "key": "csrf-token", "value": "" }, { "key": "ETag", "value": "" }, { "key": "azure-apim-host", "value": "", "type": "string" }, { "key": "Ocp-Apim-Subscription-Key", "value": "", "type": "string" }, { "key": "AzureStorageAccountName", "value": "", "type": "string" }, { "key": "AzureBlobContainerName", "value": "", "type": "string" }, { "key": "AzureBlobName", "value": "", "type": "string" }, { "key": "AzureBlobSAS", "value": "", "type": "string" }, { "key": "EntraIDTenantId", "value": "", "type": "string" }, { "key": "EntraIDClientId", "value": "", "type": "string" }, { "key": "EntraIDClientSecret", "value": "", "type": "string" }, { "key": "EntraIdBearerToken", "value": "", "type": "string" } ] }