The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

API Handbook Documentation_forAnyFlip

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by purbghosh, 2021-09-02 01:27:19

API HandBook Flipping Book

API Handbook Documentation_forAnyFlip

"id": 1,
"name": "Login Attempted"
},
"loginStatus": {
"id": 4,
"name": "Successful"
},
"eventSource": {
"id": 11,
"name": "Hub CAS"
}
}
]
}
]

Function Name

getInteractionEvents(InteractionEventUrl,client_id,client_secret,account_id,OAuth2URL
)

API Name

GET /interaction/v1/interactions

Description:

Retrieves a collection of all journeys

Overview:

Retrieves a collection of all journeys. The journey collection resources are embedded

in the items property of the response body. Use both a sort order and paging to
minimize the response size and response time. To call this resource, assign your API
Integration the Automation | Interactions | Read scope.

Endpoints and Method:

GET /interaction/v1/interactions

Function Parameters

Name Type Description
InteractionEventUrl String Required A RESTful API is an architectural style for an
API that uses HTTP's requests to access and
use data.
Client_id String Required In order to interact with Marketing cloud APIs
Client_secret String Required with authentication, we can achieve using -
Client ID and Client Secret
Account_id Integer Required Account ID is MID of Business Unit
OAuth2URL String Required To generate the bearer token

Example request

function
getInteractionEvents(InteractionEventUrl,client_id,client_secret,account_id,OAuth2URL
)

{

var token=Gettoken(client_id,client_secret,account_id,OAuth2URL);

token=token[0]
var req = new Script.Util.HttpRequest(InteractionEventUrl);
req.emptyContentHandling = 0;
req.retries = 2;
req.continueOnError = true;
req.contentType = "application/json";
req.setHeader("Authorization", token);
req.method = "GET";
var response = req.send();
Write(Stringify(response.content));
}
Example Response
HTTP/1.1 200
{
"count": 10,
"page": 2,
"pageSize": 2,
"links": {},
"items": [
{
"id": "unique-UUID-provided-by-SFMC",
"key": "a-key-that-is-unique-for-MID",
"name": "5 days gone by",
"lastPublishedDate": "0001-01-01T00:00:00",
"description": "",
"version": 1,
"workflowApiVersion": 1,

"createdDate": "2015-08-17T10:21:38.98",
"modifiedDate": "2015-08-17T10:22:22.01",
"activities": [
{
"id": "unique-UUID-provided-by-SFMC",
"key": "WAIT-2",
"name": "",
"description": "",
"type": "WAIT",
"arguments": {},
"configurationArguments": {
"waitDuration": 1,
"waitUnit": "DAYS"
},
"metaData": {
"waitType": "duration"
},
"schema": {
"arguments": {
"endDate": {
"dataType": "Date",
"isNullable": false,
"direction": "Out",
"readOnly": false,
"access": "Hidden"
},
"waitDefinitionId": {

"dataType": "Text",
"isNullable": false,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"waitForEventId": {
"dataType": "Text",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"executionMode": {
"dataType": "Text",
"isNullable": false,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"startActivityKey": {
"dataType": "Text",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},

"waitQueueId": {
"dataType": "LongNumber",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
}
}
}
},
{
"id": "unique-UUID-provided-by-SFMC",
"key": "EMAILV2-1",
"name": "",
"description": "",
"type": "EMAILV2",
"arguments": {},
"configurationArguments": {},
"metaData": {},
"schema": {
"arguments": {
"emailSubjectDataBound": {
"dataType": "Text",
"isNullable": true,
"direction": "In",
"readOnly": true,
"access": "Hidden"

},
"contactId": {
"dataType": "Number",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"contactKey": {
"dataType": "Text",
"isNullable": false,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"emailAddress": {
"dataType": "Text",
"isNullable": false,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"sourceCustomObjectId": {
"dataType": "Text",
"isNullable": true,
"direction": "In",
"readOnly": false,

"access": "Hidden"
},
"sourceCustomObjectKey": {
"dataType": "LongNumber",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"fieldType": {
"dataType": "Text",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"eventData": {
"dataType": "Text",
"isNullable": true,
"direction": "In",
"readOnly": false,
"access": "Hidden"
},
"customObjectKey": {
"dataType": "LongNumber",
"isNullable": true,
"direction": "In",

"readOnly": true,
"access": "Hidden"
}
}
}
}
],
"triggers": [],
"goals": [],
"tags": [
{"name": "Fun Run"},
{"name": "5K"}
],
"stats": {
"currentPopulation": 0,
"cumulativePopulation": 0,
"metGoal": 0,
"goalPerformance": 0
},
"entryMode": "SingleEntryAcrossAllVersions",
"defaults": {
"email": [
""
]
},
"executionMode": "Production",
"status": "Draft",

"definitionId": "unique-UUID-provided-by-SFMC"
}
]
}


Click to View FlipBook Version