獲取使用者所屬的組織

information

本頁面使用機器翻譯而成。
機器翻譯免責聲明 (External link)

目錄

獲取使用者所屬的組織

獲取使用者所屬的組織以及使用者在該組織中的職務。

關於匯出CSV檔的介面,請參見 匯出使用者所屬的組織

URL

https://sample.cybozu.com/v1/user/organizations.json

HTTP 方法

GET

所需許可權

請求

參數
參數名稱 必須 說明
code 字串 必須 使用者(登入名稱)
示例請求
URL

https://sample.cybozu.com/v1/user/organizations.json?code=sato-noboru

頁眉
1
2
3
{
  "X-Cybozu-Authorization": "QWRtaW5pc3RyYXRvcjpjeWJvenU="
}

有關請求頭的詳細資訊,請參閱 通用使用者 API 規範

回應

財產
屬性名稱 說明
organizationTitles 陣列 用戶所屬的組織和職務清單。
有關詳細資訊,請參閱 OrganizationTitle 類型
示例回應
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "organizationTitles": [
    {
      "organization": {
        "code": "Sales01",
        "description": "國內銷售部",
        "id": "2",
        "localName": "Domestic Sales Department",
        "localNameLocale": "en",
        "name": "國內銷售部",
        "parentCode": "A"
      },
      "title": {
        "code": "Manager",
        "description": "經理人",
        "id": "1",
        "name": "經理"
      }
    }
  ]
}

示例代碼

使用 curl 的請求
1
2
curl -X GET 'https://sample.cybozu.com/v1/user/organizations.json?code=sato-noboru' \
  -H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU='

限制

  • 無法獲取kintone訪客使用者。