组管理 API 方法

保留API方法来管理组,包括创建、更新、列表和删除组。

创建群组

用于创建新用户组的POST方法。

请求

POST /api/v1/groups/

示例请求主体

 {
    "name" : <string>,
    "description" : <string_may_be_null>,
 }

响应

  {
    "groupId" : <integer>,
    "pid" : <integer>,
    "name" : <string>,
    "description" : <string_may_be_null>,
    "membershipCount" : <integer>,
    "wildcards" : <list of strings>,
    "users" : <list of user IDs>
  }

更新组

用于更新用户组的PUT方法。

请求

PUT /api/v1/groups/<groupId>

示例请求主体

 {
    "name" : <string>,
    "description" : <string_may_be_null>,
 }

响应

  {
    "groupId" : <integer>,
    "pid" : <integer>,
    "name" : <string>,
    "description" : <string_may_be_null>,
    "membershipCount" : <integer>,
    "wildcards" : <list of strings>,
    "users" : <list of user IDs>
  }

列表组

用于列表用户组的GET方法。

请求

GET /api/v1/groups/

响应

[
  { 
    "groupId" : <integer>,
    "pid" : <integer>,
    "name" : <string>,
    "description" : <string_may_be_null>,
    "membershipCount" : <integer>,
    "wildcards" : <list of strings>,
    "users" : <list of user IDs>
  }, ...
]

删除群组

用于删除用户组并从该用户组中删除所有成员的DELETE方法。

请求

DELETE /api/v1/groups/<groupId>

如果成功,则返回204 No Content。 如果发生冲突,则返回409 Conflict

批量删除组

一种DELETE方法,用于批量删除多个组并从该组中删除所有成员。

请求

DELETE /api/v1/groups/bulk-delete

如果成功,则返回204 No Content。 如果发生冲突,则返回409 Conflict

列表组的所有权限

用于列表组上权限对象的GET方法。

请求

GET /api/v1/groups/{groupId}/permissions

响应

[{
 "objectId" : 34,
 "objectType": "SEGMENT",
 "permissions": ["READ", "WRITE", "DELETE", "MAP_TO_MODELS"]
 },

{
 "objectId" : "234",
 "objectType": "TRAIT",
 "permissions": ["READ", "WRITE", "DELETE", "MAP_TO_MODELS"]
 },
 {
 "objectId" : 277,
 "objectType": "SEGMENT",
 "permissions": ["READ", "WRITE", "MAP_TO_MODELS"]
 }
]

如果组无法访问,则返回400 Bad Request

设置组的权限

用于更新组权限的PUT方法。 此方法用新权限覆盖旧权限。

请求

PUT /api/v1/groups/{groupId}/permissions/

响应

[ 
  { "objectType" : "SEGMENT",
    "objectId" : 563,
    "permissions" : [ "READ", "WRITE"]
  },
  { "objectType" : "SEGMENT",
    "objectId" : 2363,
    "permissions" : [ "CREATE", "WRITE"]
  },
  { "objectType" : "TRAIT",
    "objectId" : 83498,
    "permissions" : [ "READ", "MAP_TO_SEGMENTS"]
  },
  { "objectType" : "DESTINATION",
    "objectId" : 304,
    "permissions" : [ "READ", "WRITE", "CREATE"]
  }
]

示例响应表示权限对象的更新列表。

如果成功,则返回200 OK。 如果任何给定权限无效,则返回400。 如果登录用户无法访问该对象,则还可以返回403

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now