{
	"info": {
		"_postman_id": "4ed534d0-60ad-4cd0-bc3a-5bf8f1cb29bf",
		"name": "NiNa - APIM API Ingestion",
		"description": "Prerequisites:\n\n- Make sure all environment variables (apart from `jwt`) have a current value filled in\n- Fill in the body and the media type of the `2. Post message to your channel`request\n    \n\nExecute the `1. Get access_token` request to get a valid JWT.  \nExecute a `2. Post message to your channel` request to start the ingestion.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "11784811"
	},
	"item": [
		{
			"name": "1. Get access_token",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"pm.environment.set(\"jwt\", pm.response.json().access_token);"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "client_id",
							"value": "{{clientId}}",
							"type": "text"
						},
						{
							"key": "client_secret",
							"value": "{{clientSecret}}",
							"type": "text"
						},
						{
							"key": "scope",
							"value": "{{applicationId}}/.default",
							"type": "text"
						},
						{
							"key": "grant_type",
							"value": "client_credentials",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token",
					"protocol": "https",
					"host": [
						"login",
						"microsoftonline",
						"com"
					],
					"path": [
						"{{tenantId}}",
						"oauth2",
						"v2.0",
						"token"
					]
				}
			},
			"response": []
		},
		{
			"name": "2. Post message to your channel",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Authorization",
						"value": "Bearer {{jwt}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n<ingestionDemo>\r\n\t<DocumentIdentifier>0000000003046214</DocumentIdentifier>\r\n\t<Message_Status>Original</Message_Status>\r\n\t<Date>20230421</Date>\r\n\t<Time>113616</Time>\r\n</ingestionDemo>",
					"options": {
						"raw": {
							"language": "xml"
						}
					}
				},
				"url": {
					"raw": "{{apiBaseUrl}}/{{channelId}}",
					"host": [
						"{{apiBaseUrl}}"
					],
					"path": [
						"{{channelId}}"
					]
				}
			},
			"response": []
		}
	]
}