Organization v2
- Print
- PDF
Organization v2
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Description
API to set the organization information for your company in WORKPLACE.
Common request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | * This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. * If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | * Access Key ID issued on NAVER Cloud Platform portal or by Sub Account |
x-ncp-apigw-signature-v2 | * A signature that encrypts the body of the example above with Secret Key mapped to the access key ID * HmacSHA256 is used as the HMAC encryption algorithm |
Addition API
Adds organization information.
Request URL
POST https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/department/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | * This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. * If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | * Access Key ID issued on NAVER Cloud Platform portal or by Sub Account |
x-ncp-apigw-signature-v2 | * A signature that encrypts the body of the example above with Secret Key mapped to the access key ID * HmacSHA256 is used as the HMAC encryption algorithm |
Request path parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (CompanyId)Developers > Default settings > Connection key |
externalKey | String | 36 | Y | Department external key |
Request body parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
name | String | 100 | Y | Department name |
i18nNames | Map | N | Localized department name Map<Locale, String> i18nNames | |
deptExternalKey | String | 100 | Y | Department external key |
parentDeptExternalKey | String | 100 | Y | Parent department’s external key (# only for the top level) |
deptEmailAddress | String | 100 | N | Department's email |
externalEmailReceiveYn | boolean | N | Whether it receives external emails | |
dispOrd | String | 10 | Y | Display order of departments in organization chart |
Request example
POST https://workplace.apigw.ntruss.com/organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department/apitestdept2
POST /organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department/apitestdept2
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=
{
"name" : "Test department",
"i18nNames" : {
"ko_KR" : "Test department",
"en_US" : "testDept"
},
"parentDeptExternalKey" : "apitestdept1",
"deptEmailAddress" : "testDeptEmail@sample.com",
"externalEmailReceiveYn" : true,
"dispOrd" : "1"
}
Response example
HTTP/1.1 201 OK
Server: nginx
Date: Wed, 12 Sep 2020 01: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
{
"name" : "Test department",
"i18nNames" : {
"ko_KR" : "Test department",
"en_US" : "testDept"
},
"parentDeptExternalKey" : "apitestdept1",
"deptEmailAddress" : "testDeptEmail@sample.com",
"externalEmailReceiveYn" : true,
"dispOrd" : "1"
}
Edit API
Edits department information.
Request URL
PUT https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/department/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | * This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. * If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | * Access Key ID issued on NAVER Cloud Platform portal or by Sub Account |
x-ncp-apigw-signature-v2 | * A signature that encrypts the body of the example above with Secret Key mapped to the access key ID * HmacSHA256 is used as the HMAC encryption algorithm |
Request path parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (CompanyId)Developers > Default settings > Connection key |
externalKey | String | 36 | Y | Department external key |
Request body parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
name | String | 100 | Y | Department name |
i18nNames | Map | N | Localized department nameMap<Locale, String> i18nNames | |
deptExternalKey | String | 100 | Y | Department external key |
parentDeptExternalKey | String | 100 | Y | Parent department’s external key (# only for the top level) |
deptEmailAddress | String | 100 | N | Department's email |
externalEmailReceiveYn | boolean | N | Whether it receives external emails | |
dispOrd | String | 10 | Y | Display order of departments in organization chart |
Request example
PUT
https://workplace.apigw.ntruss.com/organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department/apitestdept2
PUT /organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department/apitestdept2
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=
{
"name" : "Test department 2",
"i18nNames" : {
"ko_KR" : "Test department 2",
"en_US" : "testDept2"
},
"parentDeptExternalKey" : "apitestdept1",
"deptEmailAddress" : "testDeptEmail@sample.com",
"externalEmailReceiveYn" : true,
"dispOrd" : "2"
}
Response example
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2020 01: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
{
"name" : "Test department 2",
"i18nNames" : {
"ko_KR" : "Test department 2",
"en_US" : "testDept2"
},
"parentDeptExternalKey" : "apitestdept1",
"deptEmailAddress" : "testDeptEmail@sample.com",
"externalEmailReceiveYn" : true,
"dispOrd" : "2"
}
Delete API
Deletes department information.
Request URL
DELETE https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/department/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | * This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. * If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | * Access Key ID issued on NAVER Cloud Platform portal or by Sub Account |
x-ncp-apigw-signature-v2 | * A signature that encrypts the body of the example above with Secret Key mapped to the access key ID * HmacSHA256 is used as the HMAC encryption algorithm |
Request path parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (CompanyId)Developers > Default settings > Connection key |
externalKey | String | 36 | Y | Department external key Developers > Default settings > Connect Organization > Dept |
Search organization API
Searches organization.
Request URL
GET https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/department/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | * This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. * If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | * Access Key ID issued on NAVER Cloud Platform portal or by Sub Account |
x-ncp-apigw-signature-v2 | * A signature that encrypts the body of the example above with Secret Key mapped to the access key ID * HmacSHA256 is used as the HMAC encryption algorithm |
Request path parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key(CompanyId) Developers > Default settings > Connection key |
externalKey | String | 36 | Y | Organization external key |
Request example
GET https://workplace.apigw.ntruss.com/organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department/apitestdept3
GET /organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department/apitestdept3
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=
Response example
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2020 01: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
{
"tenantId": "c1798784-9a47-4751-ab9f-b9629825ab93",
"companyId": "c1798784-9a47-4751-ab9f-b9629825ab93",
"externalKey": "apitestdept3",
"name": "Test department 2",
"i18nNames": {
"ko_KR": "Test department 2",
"en_US": "testDept2"
},
"parentDeptExternalKey": "apitestdept1",
"deptLeaderExternalKey": null,
"deptEmailAddress" : "testDeptEmail@sample.com",
"externalEmailReceiveYn" : true,
"dispOrd": "2.0"
}
Search organization list API
Searches organization list.
Request URL
GET https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/department
Request path parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (CompanyId)Developers > Default settings > Connection key |
Request parameters
Parameter | Type | Capacity | Requirement status | Description |
---|---|---|---|---|
offset | long | N | Display offset rows first | |
limit | long | N | Display as many as the number of limits |
Request example
GET https://workplace.apigw.ntruss.com/organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department?offset=0&limit=10
GET /organization/apigw/v2/company/c1798784-9a47-4751-ab9f-b9629825ab93/department?offset=0&limit=10
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=
Response example
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2020 01: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
{
"elements": [
{
"tenantId": "c1798784-9a47-4751-ab9f-b9629825ab93",
"companyId": "c1798784-9a47-4751-ab9f-b9629825ab93",
"externalKey": "apitestdept3",
"name": "Test department 2",
"i18nNames": {
"ko_KR": "Test department 2",
"en_US": "testDept2"
},
"parentDeptExternalKey": "apitestdept1",
"deptLeaderExternalKey": null,
"deptEmailAddress" : "testDeptEmail@sample.com",
"externalEmailReceiveYn" : true,
"dispOrd": "2.0"
},
{
"tenantId": "c1798784-9a47-4751-ab9f-b9629825ab93",
"companyId": "c1798784-9a47-4751-ab9f-b9629825ab93",
"externalKey": "apitestdept2",
"name": "Test department 1",
"i18nNames": {
"ko_KR": "Test department 1",
"en_US": "testDept"
},
"parentDeptExternalKey": "apitestdept1",
"deptLeaderExternalKey": null,
"deptEmailAddress" : "testDeptEmail1@sample.com",
"externalEmailReceiveYn" : false,
"dispOrd": "1.0"
}
],
"totalCount": 2
}
Response
Returned as an HTTP status code in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General request made successfully |
201 | Created | Response code related to the success of resource creation |
400 | Bad Request | Used for failed general request |
500 | Internal Server Error | General server error. While 4xx error codes represent client-side errors, 5xx error codes represent server-side errors. |
Response example
{
"status": 400,
"code": -4020,
"errors": [],
"message": "parentDeptExternalKey is null"
}
Was this article helpful?