組織照会API

南伸二

2017.08.02既読 2687

投稿内容は全体に公開されます。 

アカウント名やドメイン名、 ConsumerKey などの非公開情報は記入しないでください。

組織照会API(~/admin/getGroup)について質問です。
APIのレスポンスが、期待した結果とは異なる値が帰ってきます。
こちらの原因、対応を教えてください。

 



 
 

LineWorksのアドレス帳



 






しかし、"getGroup"の結果が、期待した値になっていない。
▼すべて"0"▼すべて"1"▼正しい?▼ここは正しい(と思われる)
ExternalKeyGroupNamefromExternalKeyDirectionDisplayYnGroupLevel
06d9af9a-a592-4c68-8a40-15359f1c49fe旧組織01Y1
f5c05466-4b90-4992-a208-9d359f86f98eG0101Y1本来であれば、上記図の階層状態が戻ってくるはず。
167954f4-78ca-440a-9549-a10b724eb709G0401Y1具体的には、
a3a19640-b078-4647-bfaa-b04f5ce5665bG1101Y1・fromExternalKey には(Directionに従い)親のExternalKeyが入ってくるはず
3741d292-2d92-4568-ad4a-ac552a3744faG0201Y2・Direction には、階層を意識した値(0~2)が入ってくるはず。
c613f087-9ef1-47a4-af2c-a21ba113a72aG0701Y2だと認識しています。
0401ac8e-d5d3-439a-968b-e6f6876895efG1201Y2
76cf6531-cc43-444d-9539-ab3e63a165a6G1301Y3例えば左の状態は一切の階層がなく、「フラットな」組織に見えますが、
7c1b4cb4-a275-4db1-b446-851c73207586G1401Y4GroupLevelは正しく対象階層の値を返してきています。
f66d9ffd-f30d-472a-9aae-57bd85ad7446G1501Y5
ce81dbfa-3ce5-46dd-9e56-1bb856ab61ecG1601Y6
3984247d-36ed-4244-8844-058302bd7b1aG1701Y7
a2eece9c-b6e4-4139-b593-caa793b8d47cG1801Y8
3bcd4f10-c143-4112-b579-da468c239dd0G1901Y9
APIコール時のパラメータ(JSON) ※改行しています
{"tenantId":10012640,"domainId":10012640,"groupList":[
{"externalKey":"06d9af9a-a592-4c68-8a40-15359f1c49fe"},{"externalKey":"f5c05466-4b90-4992-a208-9d359f86f98e"},
{"externalKey":"3741d292-2d92-4568-ad4a-ac552a3744fa"},{"externalKey":"167954f4-78ca-440a-9549-a10b724eb709"},
{"externalKey":"a3a19640-b078-4647-bfaa-b04f5ce5665b"},{"externalKey":"0401ac8e-d5d3-439a-968b-e6f6876895ef"},
{"externalKey":"76cf6531-cc43-444d-9539-ab3e63a165a6"},{"externalKey":"7c1b4cb4-a275-4db1-b446-851c73207586"},
{"externalKey":"f66d9ffd-f30d-472a-9aae-57bd85ad7446"},{"externalKey":"ce81dbfa-3ce5-46dd-9e56-1bb856ab61ec"},
{"externalKey":"3984247d-36ed-4244-8844-058302bd7b1a"},{"externalKey":"a2eece9c-b6e4-4139-b593-caa793b8d47c"},
{"externalKey":"3bcd4f10-c143-4112-b579-da468c239dd0"},{"externalKey":"c613f087-9ef1-47a4-af2c-a21ba113a72a"}]}
レスポンス ※改行しています。上の表はこの結果を整理したものです
{"data":{"failCount":0,
successList:[
{"key":"06d9af9a-a592-4c68-8a40-15359f1c49fe","info":{"groupNo":100000000110066,"fromGroupNo":0,"externalKey":"06d9af9a-a592-4c68-8a40-15359f1c49fe","groupEmail":"!00015@extestes","groupName":"旧組織","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":1}},
{"key":"f5c05466-4b90-4992-a208-9d359f86f98e","info":{"groupNo":100000000110067,"fromGroupNo":0,"externalKey":"f5c05466-4b90-4992-a208-9d359f86f98e","groupEmail":"!00016@extestes","groupName":"G01","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":1,"groupLevel":1}},
{"key":"3741d292-2d92-4568-ad4a-ac552a3744fa","info":{"groupNo":100000000110068,"fromGroupNo":0,"externalKey":"3741d292-2d92-4568-ad4a-ac552a3744fa","groupEmail":"!00017@extestes","groupName":"G02","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":1,"groupLevel":2}},
{"key":"167954f4-78ca-440a-9549-a10b724eb709","info":{"groupNo":100000000110069,"fromGroupNo":0,"externalKey":"167954f4-78ca-440a-9549-a10b724eb709","groupEmail":"!00018@extestes","groupName":"G04","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":6,"groupLevel":1}},
{"key":"a3a19640-b078-4647-bfaa-b04f5ce5665b","info":{"groupNo":100000000110070,"fromGroupNo":0,"externalKey":"a3a19640-b078-4647-bfaa-b04f5ce5665b","groupEmail":"!00019@extestes","groupName":"G11","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":1}},
{"key":"0401ac8e-d5d3-439a-968b-e6f6876895ef","info":{"groupNo":100000000110071,"fromGroupNo":0,"externalKey":"0401ac8e-d5d3-439a-968b-e6f6876895ef","groupEmail":"!00020@extestes","groupName":"G12","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":2}},
{"key":"76cf6531-cc43-444d-9539-ab3e63a165a6","info":{"groupNo":100000000110072,"fromGroupNo":0,"externalKey":"76cf6531-cc43-444d-9539-ab3e63a165a6","groupEmail":"!00021@extestes","groupName":"G13","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":3}},
{"key":"7c1b4cb4-a275-4db1-b446-851c73207586","info":{"groupNo":100000000110073,"fromGroupNo":0,"externalKey":"7c1b4cb4-a275-4db1-b446-851c73207586","groupEmail":"!00022@extestes","groupName":"G14","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":4}},
{"key":"f66d9ffd-f30d-472a-9aae-57bd85ad7446","info":{"groupNo":100000000110074,"fromGroupNo":0,"externalKey":"f66d9ffd-f30d-472a-9aae-57bd85ad7446","groupEmail":"!00023@extestes","groupName":"G15","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":5}},
{"key":"ce81dbfa-3ce5-46dd-9e56-1bb856ab61ec","info":{"groupNo":100000000110075,"fromGroupNo":0,"externalKey":"ce81dbfa-3ce5-46dd-9e56-1bb856ab61ec","groupEmail":"!00024@extestes","groupName":"G16","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":6}},
{"key":"3984247d-36ed-4244-8844-058302bd7b1a","info":{"groupNo":100000000110076,"fromGroupNo":0,"externalKey":"3984247d-36ed-4244-8844-058302bd7b1a","groupEmail":"!00025@extestes","groupName":"G17","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":7}},
{"key":"a2eece9c-b6e4-4139-b593-caa793b8d47c","info":{"groupNo":100000000110077,"fromGroupNo":0,"externalKey":"a2eece9c-b6e4-4139-b593-caa793b8d47c","groupEmail":"!00026@extestes","groupName":"G18","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":8}},
{"key":"3bcd4f10-c143-4112-b579-da468c239dd0","info":{"groupNo":100000000110078,"fromGroupNo":0,"externalKey":"3bcd4f10-c143-4112-b579-da468c239dd0","groupEmail":"!00027@extestes","groupName":"G19","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":0,"groupLevel":9}},
{"key":"c613f087-9ef1-47a4-af2c-a21ba113a72a","info":{"groupNo":100000000110194,"fromGroupNo":0,"externalKey":"c613f087-9ef1-47a4-af2c-a21ba113a72a","groupEmail":"!00028@extestes","groupName":"G07","direction":1,"displayYn":"Y","description":"","memberCountForAdmin":2,"groupLevel":2}}
],"failList":[],"successCount":14}}"
以上

 

コメント1

  • 업데이트 된 답글입니다.

    LINE WORKS 公式アカウント

    こちらは階層(groupLevel)のみで並び順は返さないのが仕様となっております。
    別に組織マスタを持った状態で LINE WORKS 側に同期することを想定しておりましたため、このような仕様となっております。
    ご不便をおかけいたしますが、ご了承ください。

    2017.08.04

    0
前の投稿管理者画面でのユーザ属性、制限事項の変更について
次の投稿各種トークンの期日・自動延長について
リスト

まだ、解決できませんか?
今すぐ実際に使用しているLINE WORKSユーザーに質問してみましょう。