Update Clipping Profile Integration

Updates the configuration of an existing integration.

Request

Request syntax:

PATCH /clipping-profiles/Clipping Profile ID/integrations/Integration ID

Request URL variable:

Define the following variable when submitting the above request:

VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3).Description
Clipping Profile ID RequiredIdentifies a clipping profile by its system-defined or external ID. Use the Get Multiple Clipping Profiles endpoint to retrieve a list of clipping profiles and their IDs.
Integration ID  RequiredIdentifies a clipping profile integration id by its system-defined ID

Request body parameters:

NameData TypeDescription
nameStringThe name of this clipping profile integration
metamapDictionaryKey/Value[String] pairs contain the following keys: category, description, keywords, privacyStatus, profile_id and title

Response

A successful request returns a 200 OK response that contains the following properties:

NameData TypeDescription
@idStringIndicates the relative path to an endpoint that returns this clipping profile configuration.
@typeStringReturns ClippingProfileIntegrations.
createdStringIdentifies the date and time (UTC) this integration was create. Syntax: {YYYY-MM-DDThh:mm:ss.ssssss}Z Example: 2024-04-04T16:35:46.054Z
lastmodBooleanIdentifies the date and time (UTC) this integration was create. Syntax: {YYYY-MM-DDThh:mm:ss.ssssss}Z Example: 2024-04-04T16:35:46.054Z
nameStringThe name of this clipping profile integration
profileStringGUID representing the clipping profile system-generated ID
serviceStringThe type of third party service.
metamapDictionaryKey/Value[String] pairs contain the following keys: category, description, keywords, privacyStatus, profile_id and title

Sample Request/Response

Call the [clipping_profiles_integrations_update module](../Resources/Scripts/clipping_profile_integrations_patch.py) (Python 3) to update a profile integration. This module imports names from the api_auth module.

			import json
			from pprint import PrettyPrinter
			import requests
			from api_auth import APICredentials, APIParams

			pp = PrettyPrinter().pprint

			class ClippingProfiles:
			"""Class Description"""
			def __init__(self, source_list):
			"""dummy"""
			self.profile_id = None
			self.integration_id = None

			for key, value in source_list.items():
			setattr(self, key, value)

			self.host = "https://services.uplynk.com"
			self.headers = {"Content-Type": "application/json"}

			def run(self):
			"""dummy"""
			self._get_youtube_login_url()

			def _get_youtube_login_url(self):
			"""dummy"""
			end_point = f"/api/v4/clipping-profiles/{self.profile_id}/integrations/{self.integration_id}"
			url = f"{self.host}{end_point}"

			payload = {
			"metamap": {
			"category": "$blue_colors",
			"description": "@desc",
			"keywords": "$blue_colors",
			},
			}

			response = requests.patch(
			url,
			params=APIParams(APICredentials()).get_params({}),
			data=json.dumps(payload),
			headers=self.headers,
			timeout=15
			)

			pp(response.json())

			class_variables = {
			"profile_id": "be1af15490e24399bb6c4f2a36384d66",
			"integration_id": "c3eb485e9b374945a623abc3b883eb78"
			}
			ClippingProfiles(class_variables).run()

Response:

			{
			"@id": "/api/v4/clipping-profiles/be1af15490e24399bb6c4f2a36384d66/integrations/c3eb485e9b374945a623abc3b883eb78",
			"@type": "ClippingProfileIntegrations",
			"authenticated": False,
			"created": "2024-05-07T15:48:18.982Z",
			"id": "c3eb485e9b374945a623abc3b883eb78",
			"lastmod": "2024-05-07T16:18:10.257Z",
			"metamap": {
			"category": "$blue_colors",
			"description": "@desc",
			"keywords": "$blue_colors",
			"privacyStatus": "",
			"title": "@desc",
			},
			"name": "My Youtube",
			"profile": "be1af15490e24399bb6c4f2a36384d66",
			"service": "youtube",
			}