POST/users/{userId}/user-profile-statuses

구성원의 현재 상태를 추가하거나, 미래 시점의 상태를 예약할 수 있다.
현재 상태와 예약 상태는 각각 1개씩 추가할 수 있으며, 예약 상태는 startTime과 endTime을 미래 시점으로 설정해야 한다.

Authorization

oauth2

OAuth 2.0 인증.
자세한 인증 방식은 인가·인증를 참고한다.

Scope

user
directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/users/{userId}/user-profile-statuses

Path Parameters

ParameterTypeDescription
userId string 

구성원 ID
- 메일
- 리소스 ID
- 외부 키 "externalKey:{externalKey}" 형태


required
example : userf7da-f82c-4284-13e7-030f3b4c756x 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
profileStatusId string 

상태 Id
BUSY(바쁨), AWAY(자리비움), LEAVE_OFFICE(퇴근), ABSENCE(부재), CUSTOM01 ~ CUSTOM12(커스텀상태)


required
Allowed values : BUSY, AWAY, LEAVE_OFFICE, ABSENCE, CUSTOM01, CUSTOM02, CUSTOM03, CUSTOM04, CUSTOM05, CUSTOM06, CUSTOM07, CUSTOM08, CUSTOM09, CUSTOM10, CUSTOM11, CUSTOM12 
statusMessage string 

상태 메시지


maxLength : 50
nullable : true 
startTime string 

시작 일시(형식: YYYY-MM-DDThh:mm:ssTZD)
startTime이 있을 경우 반드시 endTime이 있어야 한다.


format : date-time
nullable : true 
endTime string 

종료 일시(형식: YYYY-MM-DDThh:mm:ssTZD)
startTime이 있을 경우 반드시 endTime이 있어야 한다.


format : date-time
nullable : true 
autoReplyMail object (autoReplyMail) 

자동 응답 메일 설정


nullable : true 

autoReplyMail

PropertyTypeDescription
internal object (internal) 

내부 이메일에 대한 자동 응답 메일 설정

 
external object (external) 

외부 이메일에 대한 자동 응답 메일 설정

 

internal

PropertyTypeDescription
content string 

내용


maxLength : 300 
sentDirectlyToMe boolean 

받는 사람일때만 부재 메일을 발송할지 여부


default : false 

external

PropertyTypeDescription
content string 

내용


maxLength : 300 
sentDirectlyToMe boolean 

받는 사람일때만 부재 메일을 발송할지 여부


default : false 

Request Example

example

1{2  "profileStatusId": "BUSY",3  "statusMessage": "status message1",4  "startTime": "2017-03-16T09:00:00+09:00",5  "endTime": "2017-03-18T18:00:00+09:00",6  "autoReplyMail": {7    "internal": {8      "content": "internal mail content",9      "sentDirectlyToMe": true10    },11    "external": {12      "content": "external mail content",13      "sentDirectlyToMe": false14    }15  }16}

Response

HTTP 201

OK

PropertyTypeDescription
userProfileStatusId string 

구성원 상태 ID

 
profileStatusId string 

상태 Id
BUSY(바쁨), AWAY(자리비움), LEAVE_OFFICE(퇴근), ABSENCE(부재), CUSTOM01 ~ CUSTOM12(커스텀상태)


Allowed values : BUSY, AWAY, LEAVE_OFFICE, ABSENCE, CUSTOM01, CUSTOM02, CUSTOM03, CUSTOM04, CUSTOM05, CUSTOM06, CUSTOM07, CUSTOM08, CUSTOM09, CUSTOM10, CUSTOM11, CUSTOM12 
profileStatusName string 

상태명

 
iconUrl string 

아이콘 URL

 
scheduleType string 

현재상태 또는 예약중 상태 여부


Allowed values : PRESENT, RESERVED 
statusMessage string 

상태 메시지


maxLength : 50
nullable : true 
startTime string 

시작 일시(형식: YYYY-MM-DDThh:mm:ssTZD)
startTime이 있을 경우 반드시 endTime이 있어야 한다.


format : date-time
nullable : true 
endTime string 

종료 일시(형식: YYYY-MM-DDThh:mm:ssTZD)
startTime이 있을 경우 반드시 endTime이 있어야 한다.


format : date-time
nullable : true 
autoReplyMail object (autoReplyMail) 

자동 응답 메일 설정


nullable : true 

autoReplyMail

PropertyTypeDescription
internal object (internal) 

내부 이메일에 대한 자동 응답 메일 설정

 
external object (external) 

외부 이메일에 대한 자동 응답 메일 설정

 

internal

PropertyTypeDescription
content string 

내용


maxLength : 300 
sentDirectlyToMe boolean 

받는 사람일때만 부재 메일을 발송할지 여부

 

external

PropertyTypeDescription
content string 

내용


maxLength : 300 
sentDirectlyToMe boolean 

받는 사람일때만 부재 메일을 발송할지 여부

 

Response Example

example

1{2  "userProfileStatusId": "uprofile-b785-4aae-c330-01e94337846b",3  "profileStatusId": "BUSY",4  "profileStatusName": "Busy",5  "iconUrl": "https://static.worksmobile.net/static/wm/settings/profile_state/ic-16-busy.png",6  "scheduleType": "PRESENT",7  "statusMessage": "status message1",8  "startTime": "2017-03-16T09:00:00+09:00",9  "endTime": "2017-03-18T18:00:00+09:00",10  "autoReplyMail": {11    "internal": {12      "content": "internal mail content",13      "sentDirectlyToMe": true14    },15    "external": {16      "content": "external mail content",17      "sentDirectlyToMe": false18    }19  }20}

HTTP 400

Bad Request

HTTP 403

Not used status. (도메인 상태에서 해당 상태를 사용해야 한다.)
The status must be enable. (도메인의 상태 사용이 활성화 되어 있어야 한다.)