Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Web サービスを使用した添付ファイルの作成 - Support and Troubleshooting
Parts of this topic may have been machine translated. See for more info
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Web サービスを使用した添付ファイルの作成
KB1588151

Web サービスを使用した添付ファイルの作成


336 Views Last updated : Jan 29, 2024 public Copy Permalink Japanese
  • English (Original)
  • Japanese

Issue

この記事では、次の 2 つのニーズに対応します。

  • Web サービス要求を使用して ServiceNow で添付ファイルを作成する
  • 大きなペイロードを添付ファイルとして送信する際に、添付ファイルのサイズに制限があるかどうかを判断する

Resolution

ServiceNow 製品ドキュメントの「Attachment Creator Web サービス」の指示に従います。 

この記事は SOAP Web Services 向けに書かれていますが、REST API や JSONv2 でも同じ原則を使用できます。そのような場合は、次の URL に POST 要求を送信します。

  • REST:https://<instance-name>/api/now/table/ecc_queue
  • REST のヘッダー:
    • Accept = application/json
    • Content-Type = application/json
  • JSON v2:https://<instance-name>/ecc_queue.do?JSONv2?sysparm_action=insert 
    • JSONv2 のヘッダーは必要ありません
    • 次の要求本文を使用します:
      {"agent":"AttachmentCreator","topic":"AttachmentCreator","name":"<FileName>:<Format>","source":"<targetTable>:<SysId>","payload":"<base64encodedStr>"}
      例:
      {"agent":"AttachmentCreator","topic":"AttachmentCreator","name":"john1.txt:text/plain","source":"incident:e886867e1b9b2050ac4475561a4bcb34","payload":"SSB3b25kZXIgaWYgc2hlIGtub3ducyB3aGF0IHNoZSdzIGRvaW5nIG5vdy4K"}

 

Related Links

ビジネスルールとセンサーは AttachmentCreator エージェントで挿入されたレコードを処理するために ECC キューで定義されます。前述のように、任意の Web サービスを介して ECC キューに要求を送信すると、添付ファイルが作成されます。

添付ファイルの作成は、次の要素によって制限されます。

  • ペイロードフィールドのサイズ
    • ペイロードフィールドは最大 16MB の値を指定できるため、通常、最大 16,777,215 バイト (= 15,9MB) のサイズの base64 でエンコードされたペイロードを送信しても問題ありません
    • SOAP を使用して挿入を行う場合、ペイロードファイルのサイズ制限は glide.soapprocessor.large_field_patch_max プロパティによって上書きされます
  • 添付ファイルの最大サイズプロパティ
    • 添付ファイルの最大サイズプロパティを確認するには、ServiceNow 製品ドキュメントの「添付ファイルサイズの制限」の手順に従ってください
  • 要求本文のサイズ
    • 本文が大きすぎて定義されたタイムアウト期間内に処理できない場合、トランザクション全体がキャンセルされ、タイムアウト応答が発生する可能性があります。デフォルトの HTTP タイムアウト設定を使用しても、サイズが 8 MB の添付ファイルは正常に添付されます。

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.