百度智能云

All Product Document

          Reference

          Unit Management Interface

          List Enterprise Organization Root Units

          Interface description

          View root unit information for a specified enterprise organization. Each enterprise organization currently contains only one root unit.

          Request structure

          GET /v1/organization/{organizationId}/root HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          Name Type Description
          units List <OrganizationUnit> List of units

          Request example

          GET /v1/organization/{organizationId}/root HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "root unit",
              "id": "25fc10b3bc61437aa72b35f76515b375",
              "createTime": "2018-08-29T12:02:23Z",
              "name": "root"
          }

          Create Enterprise Organization Unit

          Interface description

          Create Enterprise Organization Unit.

          Request structure

          POST /v1/organization/{organizationId}/unit HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string
          
          {
              "name": "name", 
              "description": "description" 
          }

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          name String RequestBody parameter Enterprise organization name Yes
          parentId String RequestBody parameter ID of the parent unit. If not specified, it defaults to the root unit. No
          description String RequestBody parameter Enterprise organization description No

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          OrganizationUnit Object

          Request example

          POST /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString
          
          {"name":"testUnit", "description":"test"}

          Response example

          HTTP/1.1 201 Created
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "test",
              "id": "a6ed8b858a094187b3e3cb95da73b415",
              "createTime": "2019-09-23T11:55:44Z",
              "name": "testUnit"
          }

          Delete Enterprise Organization Unit

          Interface description

          Delete Enterprise Organization Unit.

          Note: Before deleting a unit, you need to remove all members from the unit and disassociate all privilege policies.

          Request structure

          DELETE /v1/organization/{organizationId}/unit/{unitId} HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          unitId String URL parameter Unit ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          None

          Request example

          DELETE /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit/56071515f49a49a0aea628e80ebebfde
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 204 No Content
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS

          View the Enterprise Organization Unit

          Interface description

          View the specified enterprise organization unit.

          Request structure

          GET /v1/organization/{organizationId}/unit/{unitId} HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          unitId String URL parameter Unit ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          OrganizationUnit Object

          Request example

          GET /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit/a6ed8b858a094187b3e3cb95da73b415
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "test",
              "id": "a6ed8b858a094187b3e3cb95da73b415",
              "createTime": "2019-09-23T11:55:44Z",
              "name": "testUnit"
          }

          Update the Enterprise Organization Unit

          Interface description

          Updates the specified enterprise organization unit.

          Request structure

          PUT /v1/organization/{organizationId}/unit/{unitId} HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string
          
          {"name":"name", "description":"description"}

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          unitId String URL parameter Unit ID Yes
          name String RequestBody parameter Enterprise organization name No
          description String RequestBody parameter Enterprise organization description No

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          OrganizationUnit Object

          Request example

          PUT /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit/a6ed8b858a094187b3e3cb95da73b415
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString
          
          {"name":"testunit", "description":"test description"}

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "test description",
              "id": "a6ed8b858a094187b3e3cb95da73b415",
              "createTime": "2019-09-23T11:55:44Z",
              "name": "testunit"
          }

          List Unit Accounts

          Interface description

          List the member accounts in the specified enterprise organization unit, excluding members of the subunit.

          Request structure

          GET /v1/organization/{organizationId}/unit/{unitId}/account HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          unitId String URL parameter Unit ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          Name Type Description
          accounts List <Account> List of accounts

          Request example

          GET /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit/25fc10b3bc61437aa72b35f76515b375/account
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          [
              {
                  "mobile": "+86********243", 
                  "status": "ACTIVE", 
                  "description": "", 
                  "id": "a7409103bba94b0c8edf446a22c72bf7", 
                  "name": "bceaccount123"
              }, 
              {
                  "mobile": "+86********243", 
                  "status": "ACTIVE", 
                  "description": "test organization account", 
                  "id": "bfdbd1e6316b4729ab49f2cb25710068", 
                  "name": "accountasdx"
              }
          ] 

          List Unit Subunit

          Interface description

          List the member sub-units in the specified enterprise organization unit, excluding the members of the sub-units.

          Request structure

          GET /v1/organization/{organizationId}/unit/{unitId}/unit HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          unitId String URL parameter Unit ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          Name Type Description
          units List <OrganizationUnit> List of units

          Request example

          GET /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit/25fc10b3bc61437aa72b35f76515b375/unit
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          [
              {
                  "description": "test description", 
                  "id": "a6ed8b858a094187b3e3cb95da73b415", 
                  "createTime": "2019-09-23T11:55:44Z", 
                  "name": "testunit"
              }
          ] 

          List Unit Superior

          Interface description

          List the immediate superiors of the specified enterprise organization unit.

          Request structure

          GET /v1/organization/{organizationId}/unit/{unitId}/parent HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          unitId String URL parameter Unit ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          OrganizationUnit Object

          Request example

          GET /v1/organization/25fc10b3bc61437aa72b35f76515b375/unit/a6ed8b858a094187b3e3cb95da73b415/parent
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "root unit", 
              "id": "25fc10b3bc61437aa72b35f76515b375", 
              "createTime": "2018-08-29T12:02:23Z", 
              "name": "root"
          }

          List Account Superiors

          Interface description

          List the immediate superiors of the specified account.

          Request structure

          GET /v1/organization/{organizationId}/account/{accountId}/parent HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          accountId String URL parameter Account ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          OrganizationUnit Object

          Request example

          GET /v1/organization/25fc10b3bc61437aa72b35f76515b375/account/bfdbd1e6316b4729ab49f2cb25710068/parent
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "root unit", 
              "id": "25fc10b3bc61437aa72b35f76515b375", 
              "createTime": "2018-08-29T12:02:23Z", 
              "name": "root"
          }

          Mobile Account

          Interface description

          Move the specified account from the original unit to the new unit (or root unit).

          Request structure

          PUT /v1/organization/{organizationId}/account/{accountId}?parent HTTP/1.1
          Host: organization.bj.baidubce.com
          Authorization: authorization string
          
          {
              "sourceUnitId": "source unit id", 
              "destinationUnitId": "destination unit id"
          }

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Name Type Location Description Required or not
          organizationId String URL parameter Enterprise organization ID Yes
          accountId String URL parameter Account ID Yes
          sourceUnitId String RequestBody parameter Original parent unit ID Yes
          destinationUnitId String RequestBody parameter New parent unit ID Yes

          Response header fields

          There are no other special headers except the public headers.

          Response parameter

          OrganizationUnit object, the new parent unit information.

          Request example

          PUT /v1/organization/25fc10b3bc61437aa72b35f76515b375/account/bfdbd1e6316b4729ab49f2cb25710068?parent
          host: organization.bj.baidubce.com
          Authorization: AuthorizationString

          Response example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          X-Bce-Request-Id: fc96771d-f2a3-4b1a-8ed2-ea7665461baf
          Server: BWS
          
          {
              "description": "test description", 
              "id": "a6ed8b858a094187b3e3cb95da73b415", 
              "createTime": "2019-09-23T11:55:44Z", 
              "name": "testunit"
          }
          Previous
          Invitation Management Interface
          Next
          Policy Management Interface