LoginSignup
1
0

ConnectApi のまとめ

Last updated at Posted at 2024-03-04

APIのまとめに戻る


ConnectApi 名前空間 (Connect in Apex とも呼ばれる) では、Connect REST API で使用可能な同一データにアクセスするためのクラスが提供されます。Salesforce にカスタム操作を作成するには、Connect in Apex を使用します。

このプラットフォームは、 Apex にSandboxPostCopy インターフェイスを提供します。これは、この機能が存在する標準的かつ最も論理的な場所と思われます。URL と資格情報を変更するには、すべての名前付き資格情報に対して一連の手動手順を実行する必要があります。

updateNamedCredentail が Apex に組み込まれると、SandboxPostCopy インターフェイスの値を更新できるようになり、手動の手順は単純にそれらの名前付き認証情報をアクティブ化することになるようです。

または、プラットフォームが提供する SandboxPostCopy Apex と、Salesforce への API 呼び出しを行う外部システムの両方でコピー後のアクションを実行することもできます。

もう 1 つの質問 - サンドボックスの作成/更新時に資格情報がコピーされなくなることを示す画像が LinkedIn で共有されているのを見ました。それは新しい名前付き資格情報のみが対象ですか、それとも従来の名前付き資格情報も対象ですか?

The solution was to activate a permission. It is necessary to request Salesforce support to activate "Salesforce CMS: PIM integration APIs".

解決策は、アクセス許可をアクティブにすることでした。 「Salesforce CMS: PIM 統合 API」を有効にするには、Salesforce サポートに依頼する必要があります。

I noticed while playing with Postman that the endpoint URL is different from the URL displayed in the browser.

What happens if I use my.salesforce.com?

https://xxxxxx--dev3.sandbox.lightning.force.com/ <-- displayed in the browser
https://xxxxxx--dev3.sandbox.my.salesforce.com/ <-- Postman endpoint

image.png

It seems to be the same as a 404 error. Are the endpoints correct?

ConnectApi.NotFoundException

Any issues with the specified resource being found. This is equivalent to receiving a 404 error from Connect REST API.

https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_exceptions.htm

拡張サイトの場合は、非拡張サイトのConnectApi.ManagedContentメソッド ではなく、ConnectApi.ManagedContentdelivery メソッドを使用する必要があります。ただし、すべてのコレクション アイテムを取得できるメソッドはありません。

この回答を更新すべきでした。この投稿の@George Abboudの回答を参照しました 。Connect API 関数が機能するには、コレクション項目をアンラップする必要がありました。また、ドキュメントはそれ以降更新されているようで、アンラップ方法の例が追加されており、とても便利です。

I am trying to access Image Node by using connect api apex from Custom Content Type, however it is not returning me the Image url.

ファイルの操作

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0