Get Organization

Get the organization’s information.

Request Format

POST https://{apigw-address}/enos-iam-service/v2.0/organization/info

Request Parameters (Header)

Name Mandatory/Optional Data Type Description
Authorization Mandatory String Session ID, in the format of bearer token. You can get the session ID after calling the Log In API.
Content-Type Optional String The only accepted value is “application/json”.

Request Parameters (Body)

Name Mandatory/Optional Data Type Description
id Mandatory String The organization ID. How to get organization ID>>

Response Parameters

Name Data Type Description
organization Organization Struct The organization’s information. For more information, see Organization Struct >>

Organization Struct

Name Data Type Description
id String The organization ID.
domain String The EnOS user name.
name String The organization name.
description String The description of the organization.
code String The organization identifier, such as the business licence number.
extra List<JSONObejct> Extra information of the organization.
type Integer Enum The Organization Type: UNDEFINED: -1, INDIVIDUAL: 1, ENTERPRISE: 2.
state Integer Enum The Organization State: UNDEFINED: -1, NORMAL: 0, DISABLE: 1, QUIT: 2.
approvalState Integer Enum The Approval State: UNDEFINED: -1,UNAPPROVED: 0, APPROVED:1,DISAPPROVED:2.
approvalDescription String The approval description.
certificationState Integer Enum The Certification State:UNDEFINED: -1, UN_CERTIFIED: 0, CERTIFIED: 1.
ownerId String The user ID of the organization owner.
resourceId String The resource ID.
createTime String The time when this organizatoin is created.
createdByUserId String The user ID of the person that created the organizatoin.

Sample

Request Sample

url: https://{apigw-address}/enos-iam-service/v2.0/organization/info
method: POST
headers:{
  "Authorization":"yourBearerToken",
  "Content-Type":"application/json"
}
requestBody: {"id":"yourOrgId"}

Return Sample

{
    "fail": false,
    "success": true,
    "organization": {
        "createdByUserId": "userId",
        "resourceId": "resourceId",
        "code": "",
        "approvalState": 1,
        "description": "",
        "type": 2,
        "ownerId": "userId",
        "createTime": "2018-11-20 04:03:06.0",
        "domain": "",
        "extra": {
            "owner": "ownerId",
            "property": "2",
            "approvedBy": "system",
            "scale": "0",
            "registerType": "0",
            "approvedAt": "2018-11-20 04:03:06",
            "version": "2"
        },
        "name": "Demo",
        "id": "orgId",
        "state": 0,
        "certificationState": 1
    },
    "failed": false,
    "message": "",
    "status": 0,
    "successful": true
}

Java SDK Sample

public class GetOrganization{

    public static String SESSION_ID = "yourBearerToken";

    public static final String ORGANIZATIONID = "yourOrgId";

    public static void main(String[] args) {
        System.out.println("ListOrganization Test");
        OrganizationGetRequest organizationGetRequest = new OrganizationGetRequest(SESSION_ID, ORGANIZATIONID);
        OrganizationGetResponse response = getPoseidon().getResponse(organizationGetRequest, OrganizationGetResponse.class);

        System.out.println("OrganizationGetResponse res; " + JSON.toJSONString(response));
        assertNotNull("Response should not be null", response);

    }
}