Departments
- Print
- PDF
Departments
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Description
Adds, edits and deletes department information of your company in WORKBOX.
Add
Adds department information.
Request URL
POST https://workbox.apigw.ntruss.com/workbox/workbox/openapi/v1/organization/company/{companyId}/dept/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid. x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | API key issued by API Gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Access Key ID issued from the NAVER CLOUD PLATFORM portal. x-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v1 | Signature encrypted with your Access Key ID and Secret Key. x-ncp-apigw-signature-v1:{API Gateway Signature} |
Content-Type | Set the request body content type to application/json.Content-Type: application/json |
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
externalKey | String | 36 | Y | External key for a department |
Request body parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
name | String | 100 | Y | Department name |
i18nNames | Map | N | Department name in multiple languages. Map<Locale, String> i18nNames | |
sortOrd | String | 1 | Y | Display order of departments |
uprDeptExternalKey | String | 50 | Y | External key for an upper level department (# only for the top level department) |
Request example
POST https://workbox.apigw.ntruss.com/workbox/workbox/openapi/v1/organization/company/578c7009-bdad-4493-9835-72302cf988c6/dept/0000002
POST /openapi/v1/organization/company/578c7009-bdad-4493-9835-72302cf988c6/dept/0000002
HOST: workbox.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-v1: WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
{
"sortOrd": 1,
"uprDeptExternalKey" : "00001",
"name": "Operation Management Team",
"i18nNames": {
"ko_KR": "운영관리팀",
"en_US": "Operation Management Team"
}
}
Response example
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
{
"sortOrd": 1,
"uprDeptExternalKey" : "00001",
"name": "Operation Management Team",
"i18nNames": {
"ko_KR": "운영관리팀",
"en_US": "Operation Management Team"
}
}
Edit
Edits department information.
Request URL
PUT https://workbox.apigw.ntruss.com/workbox/workbox/openapi/v1/organization/company/{companyId}/dept/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid. x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | API key issued by API Gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Access Key ID issued from the NAVER CLOUD PLATFORM portal. x-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v1 | Signature encrypted with your Access Key ID and Secret Key. x-ncp-apigw-signature-v1:{API Gateway Signature} |
Content-Type | Set the request body content type to application/json.Content-Type: application/json |
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
externalKey | String | 36 | Y | External key for a department |
Request body parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
name | String | 100 | Y | Department name |
i18nNames | Map | N | Department name in multiple languages. Map<Locale, String> i18nNames | |
sortOrd | String | 1 | Y | Display order of departments |
uprDeptExternalKey | String | 50 | Y | External key for an upper level department (# only for the top level department) |
Request example
POST https://workbox.apigw.ntruss.com/workbox/workbox/openapi/v1/organization/company/578c7009-bdad-4493-9835-72302cf988c6/dept/0000002
POST /openapi/v1/organization/company/578c7009-bdad-4493-9835-72302cf988c6/dept/0000002
HOST: workbox.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-v1: WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
{
"sortOrd": 1,
"uprDeptExternalKey" : "00001",
"name": "Operation Management Team",
"i18nNames": {
"ko_KR": "운영관리팀",
"en_US": "Operation Management Team"
}
}
Response example
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
{
"sortOrd": 1,
"uprDeptExternalKey" : "00001",
"name": "Operation Management Team",
"i18nNames": {
"ko_KR": "운영관리팀",
"en_US": "Operation Management Team"
}
}
Delete
Deletes department information.
Request URL
DELETE https://workbox.apigw.ntruss.com/workbox/workbox/openapi/v1/organization/company/{companyId}/dept/{externalKey}
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid. x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | API key issued by API Gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Access Key ID issued from the NAVER CLOUD PLATFORM portal. x-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v1 | Signature encrypted with your Access Key ID and Secret Key. x-ncp-apigw-signature-v1:{API Gateway Signature} |
Content-Type | Set the request body content type to application/json.Content-Type: application/json |
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
externalKey | String | 36 | Y | External key for a department |
Response
It returns an HTTP status code in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | Success |
201 | Created | Resource successfully created. |
400 | Bad Request | Failure (It is usually used to respond to the request format that the server cannot understand.) |
500 | Internal Server Error | General server error. Whereas 4XX error codes represent client-side errors, 5XX error codes represent server-side errors. |
Was this article helpful?