Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Latest commit

 

History

History
187 lines (118 loc) · 4.06 KB

AssetApi.md

File metadata and controls

187 lines (118 loc) · 4.06 KB

SalesforceMarketingCloud.AssetApi

All URIs are relative to https://www.exacttargetapis.com

Method HTTP request Description
createAsset POST /asset/v1/content/assets createAsset
deleteAssetById DELETE /asset/v1/content/assets/{id} deleteAssetById
getAssetById GET /asset/v1/content/assets/{id} getAssetById
partiallyUpdateAssetById PATCH /asset/v1/content/assets/{id} partiallyUpdateAssetById

createAsset

Asset createAsset(body)

createAsset

Creates a new asset.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.AssetApi();

let body = new SalesforceMarketingCloud.Asset(); // Asset | JSON Parameters

apiInstance.createAsset(body).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body Asset JSON Parameters

Return type

Asset

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteAssetById

deleteAssetById(id)

deleteAssetById

Deletes an asset.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.AssetApi();

let id = 8.14; // Number | The ID of the asset to delete

apiInstance.deleteAssetById(id).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number The ID of the asset to delete

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getAssetById

Asset getAssetById(id)

getAssetById

Gets an asset by ID.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.AssetApi();

let id = 8.14; // Number | The ID of the asset

apiInstance.getAssetById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number The ID of the asset

Return type

Asset

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

partiallyUpdateAssetById

Asset partiallyUpdateAssetById(id, body)

partiallyUpdateAssetById

Updates part of an asset.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.AssetApi();

let id = 8.14; // Number | The ID of the asset to update

let body = new SalesforceMarketingCloud.Asset(); // Asset | JSON Parameters

apiInstance.partiallyUpdateAssetById(id, body).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number The ID of the asset to update
body Asset JSON Parameters

Return type

Asset

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined