Adding additional attributes
    • PDF

    Adding additional attributes

    • PDF

    Article Summary

    Description

    This API allows you to directly input and manage additional attributes of personnel not included in the base attributes according to company-specific policies. You can add a variety of attributes (Y/N, optional, date, descriptive, etc.), and if desired, they can be displayed as search results.

    Add API

    Adds additional attributes

    Request URL

    POST https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/addattr/{externalKey}
    

    Request headers

    Request headers

    HeaderDescription
    x-ncp-apigw-timestamp- It indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    - Request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-iam-access-key- Access key ID issued from the NAVER Cloud Platform portal or a sub-account
    x-ncp-apigw-signature-v2- Signature of the body in the above example encrypted with secret key mapped to access key ID
    - HMAC encryption algorithm is HMAC-SHA256

    Request path parameters

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YIntegration key (CompanyId) Developers > Default settings > Integration key
    externalKeyString36YAdditional information external key

    Request body parameters

    ParameterTypeSizeRequirement statusDescription
    fieldTypeString50YField type
    nameString100YAttribute name
    i18nNamesMapNMultilingual attribute name: Map<Locale, String> i18nNames
    fieldUsedTypeString100NType of account using additional attributes (General employee: MEM)
    searchDispYnString1YPersonnel search result exposure status
    userDispYnString1YUser-viewable status
    userModString20YUser-modifiable status (User-modifiable: CHANGE / Not user-modifiable: UNCHANGED / Hidden: INVISIBLE)
    attrItemListListNOptional data list
    externalKeyNForeign key (external)
    itemNameNOptional default attribute name
    i18nItemNamesNOptional multilingual attribute name: Map<Locale, String> i18nNames
    fieldTypeItemOrdIntNOrder/sequence

    Request examples

    POST https://workplace.apigw.ntruss.com/organization/apigw/v1/company/adc835a8-244c-46b4-8410-7421816d4808/addattr/gw02attrext0002
    
    POST /organization/apigw/v1/company/adc835a8-244c-46b4-8410-7421816d4808/addattr/gw02attrext0002
    HOST: workplace.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp: 1505290625682
    x-ncp-apigw-api-key: DUxjP4HYTP8V7khBkgywdDHQjKuaYWGrppHKpvdv
    x-ncp-iam-access-key: D78BB444D6D3C84CA38A
    x-ncp-apigw-signature-v2: WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
    {
       "fieldUsedType" :"MEM",
        "searchDispYn": "Y",
        "userDispYn": "N",
        "fieldType": "INPUT",
         "name": "employee number",
        "i18nNames": {
                "ko_KR": "사원번호",
                "en_US": "empno"
            },
        "userMod": "CHANGE"
     }
    
    or
    
    {
       "fieldUsedType" :"MEM",
        "searchDispYn": "Y",
        "userDispYn": "N",
        "fieldType": "SELECT",
        "attrItemList" : [
           {"itemName": "in office",
    	     "i18nItemNames": {
                "ko_KR": "재직",
                "en_US": "status111"
            },
           "fieldTypeItemOrd":1  }
           ,
            {"itemName": "leave of absence",
    		"i18nItemNames": {
                "ko_KR": "휴직",
                "en_US": "status222"
            },
            "fieldTypeItemOrd": 2  }
            ],
        "name": "employment status",
        "i18nNames": {
                "ko_KR": "재직여부",
                "en_US": "status"
            },
        "userMod": "CHANGE"
    }
    

    Response examples

    HTTP/1.1 201 OK
    Server: nginx
    Date: Wed, 12 Sep 2018 10:18:11 GMT
    Content-Type: application/json;charset=utf-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
    
    {
        "searchDispYn": "Y",
        "userDispYn": "N",
        "fieldType": "SELECT",
        "attrItemList" : [
           {"itemName": "in office",
    	     "i18nItemNames": {
                "ko_KR": "재직",
                "en_US": "status111"
            },
           "fieldTypeItemOrd":1  }
           ,
            {"itemName": "leave of absence",
    		"i18nItemNames": {
                "ko_KR": "휴직",
                "en_US": "status222"
            },
            "fieldTypeItemOrd": 2  }
            ],
        "name": "employment status",
        "i18nNames": {
                "ko_KR": "재직여부",
                "en_US": "status"
            },
        "userMod": "CHANGE"
    }
    

    Edit API

    Edits additional attributes

    Request URL

    PUT https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/addattr/{externalKey}
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestamp* It indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    * Request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-iam-access-key* Access key ID issued from the NAVER Cloud Platform portal or a sub-account
    x-ncp-apigw-signature-v2* Signature of the body in the above example encrypted with secret key mapped to access key ID
    * HMAC encryption algorithm is HMAC-SHA256

    Request path parameters

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YIntegration key (CompanyId) Developers > Default settings > Integration key
    externalKeyString36YAdditional information external key

    Request body parameters

    ParameterTypeSizeRequirement statusDescription
    fieldTypeString50YField type
    nameString100YAttribute name
    i18nNamesMapNMultilingual attribute name: Map<Locale, String> i18nNames
    searchDispYnString1YPersonnel search result exposure status
    userDispYnString1YUser-viewable status
    userModString20YUser-modifiable status (User-modifiable: CHANGE / Not user-modifiable: UNCHANGED / Hidden: INVISIBLE)
    attrItemListListNOptional data list
    externalKeyNForeign key (external)
    itemNameNOptional default attribute name
    i18nItemNamesNOptional multilingual attribute name: Map<Locale, String> i18nNames
    fieldTypeItemOrdIntNOrder/sequence

    Request examples

    POST https://workplace.apigw.ntruss.com/organization/apigw/v1/company/adc835a8-244c-46b4-8410-7421816d4808/addattr/gw02attrext0002
    
    POST /organization/apigw/v1/company/adc835a8-244c-46b4-8410-7421816d4808/addattr/gw02attrext0002
    HOST: workplace.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp:1505290625682
    x-ncp-apigw-api-key:DUxjP4HYTP8V7khBkgywdDHQjKuaYWGrppHKpvdv
    x-ncp-iam-access-key:D78BB444D6D3C84CA38A
    x-ncp-apigw-signature-v2:WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
    {
        "searchDispYn": "Y",
        "userDispYn": "N",
        "fieldType": "INPUT",
         "name": "employee number",
        "i18nNames": {
                "ko_KR": "사원번호",
                "en_US": "empno"
            },
        "userMod": "UNCHANGED"
     }
    
    or
    
    {
        "searchDispYn": "Y",
        "userDispYn": "N",
        "fieldType": "SELECT",
        "attrItemList" : [
           {"itemName": "in office",
    	     "i18nItemNames": {
                "ko_KR": "재직",
                "en_US": "status111"
            },
           "fieldTypeItemOrd":1  }
           ,
            {"itemName": "leave of absence",
    		"i18nItemNames": {
                "ko_KR": "휴직",
                "en_US": "status222"
            },
            "fieldTypeItemOrd": 2  }
            ],
        "name": "employment status",
        "i18nNames": {
                "ko_KR": "재직여부",
                "en_US": "status"
            },
        "userMod": "INVISIBLE"
    }
    

    Response examples

    HTTP/1.1 201 OK
    Server: nginx
    Date: Wed, 12 Sep 2018 10:18:11 GMT
    Content-Type: application/json;charset=utf-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
    
    {
        "searchDispYn": "Y",
        "userDispYn": "N",
        "fieldType": "SELECT",
        "attrItemList" : [
           {"itemName": "in office",
    	     "i18nItemNames": {
                "ko_KR": "재직",
                "en_US": "In office"
            },
           "fieldTypeItemOrd":1  }
           ,
            {"itemName": "leave of absence",
    		"i18nItemNames": {
                "ko_KR": "휴직",
                "en_US": "On leave of absence"
            },
            "fieldTypeItemOrd": 2  }
            ],
        "name": "employment status",
        "i18nNames": {
                "ko_KR": "재직여부",
                "en_US": "status"
            },
        "userMod": "INVISIBLE"
    }
    

    Delete API

    Deletes additional attributes

    Request URL

    DELETE https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/addattr/{externalKey}
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestamp- It indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    - Request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-iam-access-key- Access key ID issued from the NAVER Cloud Platform portal or a sub-account
    x-ncp-apigw-signature-v2- Signature of the body in the above example encrypted with secret key mapped to access key ID
    - HMAC encryption algorithm is HMAC-SHA256

    Request path parameters

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YIntegration key (CompanyId) Developers > Default settings > Integration key
    externalKeyString36YAdditional information external key

    Full List API

    Retrieves full list of set additional attributes

    Request URL

    GET https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/addattrs
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestamp- It indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    - Request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-iam-access-key- Access key ID issued from the NAVER Cloud Platform portal or a sub-account
    x-ncp-apigw-signature-v2- Signature of the body in the above example encrypted with secret key mapped to access key ID
    - HMAC encryption algorithm is HMAC-SHA256

    Request path parameters

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YIntegration key (CompanyId) Developers > Default settings > Integration key

    Response examples

    HTTP/1.1 200 OK
    Server: nginx
    Date: Wed, 12 Sep 2018 10:18:11 GMT
    Content-Type: application/json;charset=utf-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
    [
        {
            "fieldType": "SELECT",
            "searchDispYn": "Y",
            "userModYn": "N",
            "dispOrd": 0,
            "name": "shuttle information",
            "i18nNames": {
                "ko_KR": "셔틀",
                "en_US": "Shuttle"
            },
            "attrItemList": [
                {
                    "fieldTypeItemOrd": 0,
                    "itemName": "Gangnam",
                    "i18nItemNames": {
                        "ko_KR": "강남_ko",
                        "en_US": "Gangnam_en"
                    }
                },
                {
                    "fieldTypeItemOrd": 1,
                    "itemName": "Jamsil",
                    "i18nItemNames": {
                        "ko_KR": "잠실_ko",
                        "en_US": "Jamsil_en"
                    }
                },
                {
                    "fieldTypeItemOrd": 2,
                    "itemName": "Seoul station",
                    "i18nItemNames": {
                        "ko_KR": "서울역_ko",
                        "en_US": "Seoul station_en"
                    }
                },
                {
                    "fieldTypeItemOrd": 3,
                    "itemName": "Sindorim",
                    "i18nItemNames": {
                        "ko_KR": "신도림_ko",
                        "en_US": "Sindorim_en"
                    }
                },
                {
                    "fieldTypeItemOrd": 4,
                    "itemName": "Incheon",
                    "i18nItemNames": {
                        "ko_KR": "인천_ko",
                        "en_US": "Incheon_en"
                    }
                },
                {
                    "fieldTypeItemOrd": 5,
                    "itemName": "Suwon",
                    "i18nItemNames": {
                        "ko_KR": "수원_ko",
                        "en_US": "Suwon_en"
                    }
                },
                {
                    "fieldTypeItemOrd": 6,
                    "itemName": "Anyang",
                    "i18nItemNames": {
                        "ko_KR": "안양_ko",
                        "en_US": "Anyang_en"
                    }
                }
            ]
        }
    ]
    

    Responses

    Returned as HTTP status codes in the response body

    HTTP status codeResponse messageDescription
    200OKNormal successful request
    201CreatedSuccessful resource creation
    400Bad RequestRequest failure (common response when a request received is in a format that the server cannot parse)
    500Internal Server Error- Common server error
    - Error codes in the 400 range indicate client-side errors
    - Error codes in the 500 range indicate server-side errors

    Available field types

    fieldTypeDescription
    INPUTDescriptive type
    DATEDate type
    YESNOY/N type
    SELECTOptional

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.