この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

Articles Details

ユーザがアクセスできるすべての記事項目を取得します。

構文

適用開始バージョン
38.0
メソッド
GET
形式
JSON、XML
認証
OAuth accesstoken
エンドポイント
[prefix]/support/knowledgeArticles/{articleId}
HTTP ヘッダー
Accept: 省略可能。application/json または application/xml のいずれかです。
Accept-language: 必須。記事は、ユーザの組織で有効になっている言語で記述されている必要があります。
  • 言語コードが有効でない場合、「言語コードが有効でないか、ナレッジでサポートされていません。」というエラーメッセージが返されます。
  • 言語コードが有効であるが、ナレッジでサポートされていない場合、「無効な言語コードです。言語がナレッジ言語設定に含まれていることを確認してください。」というエラーメッセージが返されます。
入力:
string channel: 省略可能。デフォルトはユーザのコンテキストです。チャネル値の詳細は、「有効な channel 値」を参照してください。
  • App: 内部 Salesforce ナレッジアプリケーションで参照可能
  • Pkb: 公開知識ベースで参照可能
  • Csp: カスタマーポータルで参照可能
  • Prm: パートナーポータルで参照可能

boolean udpateViewStat: 省略可能。デフォルトは true です。true の場合、API は、合計参照数だけでなく指定されたチャネルの参照数も更新します。

出力:
記事がオンラインで現在のユーザに対して表示可能な場合の記事の詳細項目。
  • Article Detail

    記事の完全な詳細。記事の表示に使用される完全なメタデータおよびレイアウト主導項目が含まれます。Article Summary 表現と同じプロパティがすべて含まれます。

    1{
    2         "id":  Id,    // articleId,
    3         "articleNumber": String,
    4         "title":  String,
    5         "summary":  String,
    6         "url":  URL,
    7         "versionNumber": Int,
    8         "createdDate": Date,  // in ISO8601 format
    9         "createdBy": User Summary,
    10         "lastModifiedDate": Date,   // in ISO8601 format
    11         "lastModifiedBy": User Summary,
    12         "lastPublishedDate": Date, // in ISO8601 format
    13         "layoutItems": [ Article Field, ... ],  // standard and custom fields visible to the user, sorted based on the layouts of the article type.
    14         "categories": [ Data Category Groups, ... ], 
    15         "appUpVoteCount": Int,
    16         "cspUpVoteCount": Int,
    17         "prmUpVoteCount": Int,
    18         "pkbUpVoteCount": Int,
    19         "appDownVoteCount": Int,
    20         "cspDownVoteCount": Int,
    21         "prmDownVoteCount": Int,
    22         "pkbDownVoteCount": Int,
    23         "allViewCount": Int,
    24         "appViewCount": Int,
    25         "cspViewCount": Int,
    26         "prmViewCount": Int,
    27         "pkbViewCount": Int,
    28         "allViewScore": Double,
    29         "appViewScore": Double,
    30         "cspViewScore": Double,
    31         "prmViewScore": Double,
    32         "pkbViewScore": Double
    33         }
  • User Summary
    1{
    2         "id": String
    3         "isActive": boolean   // true/false
    4         "userName": String   // login name
    5         "firstName": String
    6         "lastName": String
    7         "email": String
    8         "url": String              // to the chatter user detail url: /services/data/xx.x/chatter/users/{userId}, for guest user, it will return null.
    9         }
  • Article Field

    記事情報の個別の項目。Article Detail 内にシステム管理者のレイアウトで必要な順序で表示されます。

    1{
    2         "type":  Enum,         // see the Notes
    3         "name": String,        // field name
    4         "label": String,         // label
    5         "value": String,  
    6         }

入力
1/services/data/v38.0/support/knowledgeArticles/kA0xx000000000LCAQ
2       HTTP Headers:  
3       Content-Type: application/json; charset=UTF-8
4       Accept: application/json
5       Accept-Language: en-US
出力
1{
2       "allViewCount" : 17,
3       "allViewScore" : 100.0,
4       "appDownVoteCount" : 0,
5       "appUpVoteCount" : 0,
6       "appViewCount" : 17,
7       "appViewScore" : 100.0,
8       "articleNumber" : "000001004",
9       "categoryGroups" : [ ],
10       "createdBy" : {
11       "email" : "user@company.com",
12       "firstName" : "Test",
13       "id" : "005xx000001SvoMAAS",
14       "isActive" : true,
15       "lastName" : "User",
16       "url" : "/services/data/v38.0/chatter/users/005xx000001SvoMAAS",
17       "userName" : "admin@salesforce.org"
18       },
19       "createdDate" : "2016-06-21T21:10:54Z",
20       "cspDownVoteCount" : 0,
21       "cspUpVoteCount" : 0,
22       "cspViewCount" : 0,
23       "cspViewScore" : 0.0,
24       "id" : "kA0xx000000000LCAQ",
25       "lastModifiedBy" : {
26       "email" : "user@company.com",
27       "firstName" : "Test",
28       "id" : "005xx000001SvoMAAS",
29       "isActive" : true,
30       "lastName" : "User",
31       "url" : "/services/data/v38.0/chatter/users/005xx000001SvoMAAS",
32       "userName" : "admin@salesforce.org"
33       },
34       "lastModifiedDate" : "2016-06-21T21:11:02Z",
35       "lastPublishedDate" : "2016-06-21T21:11:02Z",
36       "layoutItems" : [ {
37       "label" : "Out of Date",
38       "name" : "IsOutOfDate",
39       "type" : "CHECKBOX",
40       "value" : "false"
41       }, {
42       "label" : "sample",
43       "name" : "sample",
44       "type" : "PICK_LIST",
45       "value" : null
46       }, {
47       "label" : "Language",
48       "name" : "Language",
49       "type" : "PICK_LIST",
50       "value" : "en_US"
51       }, {
52       "label" : "MyNumber",
53       "name" : "MyNumber",
54       "type" : "NUMBER",
55       "value" : null
56       }, {
57       "label" : "My File",
58       "name" : "My_File",
59       "type" : "FILE",
60       "value" : null
61       } ],
62       "pkbDownVoteCount" : 0,
63       "pkbUpVoteCount" : 0,
64       "pkbViewCount" : 0,
65       "pkbViewScore" : 0.0,
66       "prmDownVoteCount" : 0,
67       "prmUpVoteCount" : 0,
68       "prmViewCount" : 0,
69       "prmViewScore" : 0.0,
70       "summary" : "The number of characters required for complete coverage of all these languages' needs cannot fit in the 256-character code space of 8-bit character encodings, requiring at least a 16-bit fixed width encoding or multi-byte variable-length encodings. \r\n\r\nAlthough CJK encodings have common character sets, the encodings often used to represent them have been developed separately by different East Asian governments and software companies, and are mutually incompatible. Unicode has attempted, with some controversy, to unify the character sets in a process known as Han unification.\r\n\r\nCJK character encodings should consist minimally of Han characters p",
71       "title" : "Test Images",
72       "url" : "/services/data/v38.0/support/knowledgeArticles/kA0xx000000000LCAQ",
73       "versionNumber" : 7
74       }

使用方法

Salesforce ナレッジが組織で有効になっている必要があります。このリソースは API バージョン 38.0 以降で使用できます。カスタムファイル項目は、バイナリストリームへのリンクを返すため、サポートされていません。「Salesforce がサポートする言語は?」で使用されている言語コード形式を使用してください。

ルックアップカスタム項目は、ルックアップエンティティ種別に応じてゲストユーザに表示されます。たとえば、ユーザは表示されますが、ケースと取引先は表示されません。次の標準項目は、レイアウトに含まれている場合でもゲストユーザには表示されません。
  • archivedBy
  • isLatestVersion
  • translationCompletedDate
  • translationImportedDate
  • translationExportedDate
  • versionNumber
  • visibleInInternalApp
  • visibleInPKB
  • visibleToCustomer
  • visbileToPartner

有効な channel

  • string channel オプションを使用して、一致する記事が表示される場合、次の値が有効です。
    • App – 内部 Salesforce ナレッジアプリケーションで参照可能
    • Pkb – 公開知識ベースで参照可能
    • Csp – カスタマーポータルで参照可能
    • Prm – パートナーポータルで参照可能
  • channel が指定されていない場合、ユーザの種別によってデフォルト値が決まります。
    • ゲストユーザの Pkb
    • カスタマーポータルユーザの Csp
    • パートナーポータルユーザの Prm
    • 他の種別のユーザの App
  • channel が指定されている場合、指定された値を使用して記事を取得できます。
    • ゲストユーザ、カスタマーポータルユーザ、パートナーポータルユーザの場合、指定されたチャネルがユーザがアクセスできるチャネルと異なる場合はエラーが返されます。
    • ゲストユーザ、カスタマーポータルユーザ、パートナーポータルユーザ以外のすべてのユーザの場合は、指定されたチャネル値が使用されます。