LoginSignup
0
1

APIのまとめ

Last updated at Posted at 2022-10-21

まとめページに戻る
まとめA~M

制限

変更があったか調査中みたい

レスポンス

以下に書かれているように、カスタマイズの設定によって異なるので正確には分からないようです。実際に試してみるのがいいと書かれています。

例えばPostmanなどのツールを使えばレスポンス時間を確かめることができると思います。

There's no way to know, because (a) customizations can increase the time, and (b) system load does have some impact.

The minimal amount of time for a pristine org is about 1ms per record (1/1,000th of a second), and can easily be over 10,000ms per record.

If you're really curious, try a load late at night and one at noon. That should give you theoretical minimums and maximums for your org.

https://salesforce.stackexchange.com/questions/192929/response-time-benchmarks-for-salesforce-apis

APIの制限にも注意が必要です。

API Request Limits and Allocations
https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm

API 応答でアクセス トークンを公開すると、セキュリティ リスクが生じるため、お勧めできません。

アクセス トークンを安全に取得するには、OAuth 認証フローの使用を検討してください。 OAuth を使用してアクセス トークンを取得すると、それを使用して承認された API リクエストを行うことができます。

接続のための接続アプリの設定

CURL環境

各種API

A

B

Bulk API

204 に基づくと、これは DELETE リクエストと一部の PATCH リクエストの「No Content」成功コードであるようです。使用されるコンテキストに関係なく、ステータス コード 204 は常に成功応答です。

CPQ API

ChatREST API

C

E

F

K

L

M

P

PubSub API

R

S

英語ですが、以下を参考にしてみてください。

Connect to the Salesforce SOAP API in .Net
https://shetland.azurewebsites.net/2021/05/11/connect-to-the-salesforce-soap-api-in-net/

T

U

V

トラブルシューティング

  • Make sure there is no error in the configuration of your request. Look for typos, whitespaces, or invalid JSON formatting.
  • Compare the API documentation of the service you’re making a call to with the configuration of your request. Check that the elements below are configured correctly in the request:
    • The request headers
    • The parameters in the request body
    • The query parameters
    • The HTTP method

In postman you are send parama as Query parameters but in your code you are sending as body...that make the server to takes this request as POST request...

postmanではパラメータをクエリパラメータとして送信していますが、コードでは本文として送信しています...これにより、サーバーはこのリクエストをPOSTリクエストと

As mentioned in the unit steps, you have to add the security token at the end of the password.

[
    {
        "message": "\nSelect MonthlyLoginsEntitlement,MonthlyLoginsUsed\n       ^\nERROR at Row:1:Column:8\nNo such column 'MonthlyLoginsEntitlement' on entity 'UserLicense'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.",
        "errorCode": "INVALID_FIELD"
    }
]

API アクセス制御機能は SOAP API に影響しますか?

API アクセス制御を使用して、承認された接続アプリケーションを通じて事前承認されていない限り、ユーザが Salesforce API にアクセスするのを制限できます。
接続アプリケーションは、外部アプリケーションを Salesforce API と統合します。
API アクセス制御を使用すると、すべての接続アプリケーションの Salesforce API へのアクセスをロックダウンしてから、特定の接続アプリケーションを承認 (許可リストに登録) できます。
プロファイルと権限セットを使用して、承認された接続アプリケーションへのアクセス権をユーザーに付与できます。これらのユーザは、接続アプリケーションを介して API にアクセスできます。

同じ質問をお持ちの方のために、カスタマー サクセス チームに連絡したところ、PM から返信がありました。

これを有効にすると、接続されたアプリによって生成されたトークンを使用していない限り、すべての API 呼び出しがブロックされるため、SOAP ログインもブロックされます。
ログインがブロックされない可能性がありますが、SOAP login() 呼び出しから受信したセッションは、どの API でも機能しません (接続されたアプリケーションを介していないため)。

API アクセス制御を有効にして、「管理者が承認したユーザーは、許可リストに登録された接続アプリのみに API アクセスを制限する」に設定した場合、Salesforce 組織へのすべての API 呼び出しで、許可リストに登録された接続アプリからトークンを取得する必要がありますか?ユーザー名とパスワードを使用して SOAP login() を実行しなくなりましたか?

答えは「はい」です。また、SOAP API を使用する場合は、OAuth ログイン フローを使用して、SOAP API 呼び出しで使用できるトークンを取得する必要があります。

相互認証

API only user

"statusCode": "400",
"message": "insufficient access rights on object id",

What I did: create a permission set (not a permission set license), which gives access to the Account, Contact, etc. object.

And, important: the permission set must have the License "Salesforce API Integration".

https://salesforce.stackexchange.com/questions/400073/trying-to-use-salesforce-integration-user-license-unable-to-access-accounts-et

APIのアップデート

ここで重要なのは、「カスタム コードが大量にありますか?」ということです。

Salesforce 組織にどのようなカスタマイズが追加されたかを理解することは常に価値があります。組織の年齢は開始点として適しています。インストールされた日付は、[設定] > [会社情報] で確認できます。

古い組織では、より多くのカスタム コードが含まれる傾向があります。これは、廃止される古い API バージョンが最も影響を与える可能性がある部分です。古いコードは通常、古い API バージョンを意味します。これが自分に当てはまると思われる場合は、懸念事項の確認と特定を支援してもらうための無料プロジェクト ( impactexchange.salesforce.com ) を依頼する必要があります。

多くの統合を行っている組織 (たとえば、複数のプラットフォームから寄付を受け入れている場合、またはオンライン フォームがある場合) には、多くの場合、パッケージ化されたものが大量にインストールされています ([設定] > [アプリ] > [パッケージ化] > [インストール済みパッケージ])。幸いなことに、ソフトウェアが最新の API バージョンを使用しているかどうかは、アプリプロバイダーの責任です。インストールされている各パッケージの最終変更日を確認する必要があります。2 年前より古いものについては、プロバイダー (パッケージの AppExchange ページから始めます) に問い合わせて、内容を確認する必要がある場合があります。場合によっては、ベンダーが失踪し、パッケージを入手するためにアクセスできなくなる場合があります。この時点で、おそらくそのパッケージを削除し、代わりのパッケージを探すことを検討する必要があります。ユーザーが使用していない可能性もあります。

Apex、Visualforceページ バージョン36.0~39.0と45.0の変更点について

今回の件に関連するような質問と回答があります。

APIのバージョンのアップグレードの関する既知の問題の包括的なリストはSalesforceの中で管理されているのか?→ そんな資料は見たことがない。

私も見たことがないですね。あれば欲しいです。価値があると回答されてますね。
対象のクラスを抽出してSandboxで確認するしかないと思います。まずはテストクラスがエラーにならないかを確認してみてください。

I can think of the SeeAllData as well, API 28 to 29 or thereabouts. Lately, though, I don't have specific "break" examples to draw from when moving UP the API ladder. Is there a comprehensive list of known issues when upgrading API versions, maintained by SF or anyone else, for that matter?

I haven't seen such a list. These things, such as breaking changes, tend to appear in the release notes and then get forgotten about. There were several when the new Apex compiler was released. I haven't seen a single source. It could be something worth putting together and then adding to over time.

https://salesforce.stackexchange.com/questions/229795/is-there-a-way-to-upgrade-api-versions-of-all-apex-classes-without-manually-upda

B2C Commerce

You can't update Price with Rest APIs. An update of the price can only be done via XML import. You could create a job that imports XML file with prices, and trigger the job via Rest API.

In the unofficial community there is a thread on this topic -> https://sfcc-unofficial.slack.com/archives/CAT794PC3/p1701767509593959

REST API を使用して価格を更新することはできません。価格の更新は、XML インポート経由でのみ行うことができます。価格を含む XML ファイルをインポートするジョブを作成し、Rest API 経由でジョブをトリガーできます。

非公式コミュニティには、このトピックに関するスレッドがあります -> https://sfcc-unofficial.slack.com/archives/CAT794PC3/p1701767509593959

マーケティング クラウド API/Postman

以下は放棄されたカートに特化した API ではなく、ジャーニーを開始するためのエントリー イベントを発生させる API です。以下を参考に実装してみてください。

https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/postEvent.html

0
1
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
0
1