WSD 그룹 예약 API
(WSD) 그룹 예약 API는 Workplace Service Delivery 그룹 예약을 관리하기 위한 엔드포인트를 제공합니다.
그룹 예약을 사용하면 동일한 회의에 대해 다양한 사람(그룹)에 대해 서로 다른 위치를 예약할 수 있습니다.
이 API는 sn_wsd_rsv 네임스페이스에서 실행됩니다. 이 API에 액세스하려면 호출자에게 sn_wsd_core.workplace_user 역할이 있어야 하며 Workplace Reservation Management(sn_wsd_rsv) 플러그인이 활성화되어 있어야 합니다.
에 대한 Workplace Reservation Management자세한 내용은 Workplace Reservation Management를 참조하십시오.
WSD 그룹 예약 - GET /api/sn_wsd_rsv/group_reservation/{parent_id}
지정된 그룹 예약에 대한 상위 및 모든 하위 예약을 반환합니다.
URL 형식
버전이 지정된 URL: /api/sn_wsd_rsv/{api_version}/ group_reservation/{parent_id}
기본 URL: / api/sn_wsd_rsv/group_reservation/{parent_id}
지원되는 요청 매개변수
| 이름 | 설명 |
|---|---|
| api_version | 옵션입니다. 액세스할 엔드포인트의 버전입니다. 예를 들면 v1 또는 v2입니다. 최신 버전이 아닌 엔드포인트 버전을 사용하려면 이 값만 지정합니다. 데이터 유형: 문자열 |
| parent_id | 상위 예약 기록의 Sys_id입니다. 직장 예약[sn_wsd_rsv_reservation] 테이블에 있습니다. 그룹 예약이 생성되면 한 개의 그룹 상위 기록과 하나 이상의 하위 예약 기록이 생성됩니다. 예약 기록에는 예약 기록의 유형을 나타내는 reservation_subtype라는 필드가 포함되어 있습니다. 그룹 상위 기록의 경우 이 필드는 그룹 상위 기록임을 나타내기 위해 "그룹 상위"로 설정됩니다. 하위 기록의 경우 이 필드는 "단일"로 설정됩니다. 하위 기록 내에서 연결된 상위 예약 기록의 sys_id source_reservation 필드에 있습니다. 데이터 유형: 문자열 |
| 이름 | 설명 |
|---|---|
| 없음 |
| 이름 | 설명 |
|---|---|
| 없음 |
헤더
다음 요청 및 응답 헤더는 이 HTTP 작업에만 적용되거나 이 작업에 고유한 방식으로 적용됩니다. REST API에서 사용되는 일반 헤더 목록은 지원되는 REST API 헤더를 참조하세요.
| 헤더 | 설명 |
|---|---|
| 수용 | 요청 본문의 데이터 형식입니다. 지원되는 유형: application/json, 또는, text/xmlapplication/xml . 기본값: application/json |
| 헤더 | 설명 |
|---|---|
| 없음 |
상태 코드
다음 상태 코드는 이 HTTP 작업에 적용됩니다. REST API에서 사용할 수 있는 상태 코드 목록은 REST API HTTP 응답 코드를 참조하세요.
| 상태 코드 | 설명 |
|---|---|
| 200 | 성공입니다. 요청이 성공적으로 처리되었습니다. |
| 400 | 잘못된 요청입니다. 상위 예약sys_id 잘못되었거나 제공되지 않았습니다. |
| 404 | 접근이 거부되었습니다. 그룹 예약을 취소할 수 없습니다. 사용자에게 요청된 그룹 예약을 취소할 수 있는 권한이 없습니다. |
| 500 | 내부 서버 오류입니다. 요청을 처리하는 동안 예기치 않은 오류가 발생했습니다. 응답에는 오류에 대한 추가 정보가 포함되어 있습니다. |
응답 본문 매개변수
| 이름 | 설명 |
|---|---|
| 결과 | 그룹 예약과 연결된 상위 및 하위 예약에 대한 상세 정보입니다. 데이터 유형: 객체 |
cURL 요청
다음 코드 예제에서는 그룹 예약에 대한 세부 정보를 검색하는 방법을 보여 줍니다.
curl "http://instance.servicenow.com/api/sn_wsd_rsv/group_reservation/e2245051533b01103cf7ddeeff7b12d6" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'
반환 결과:
{
"result": {
"parent": {
"sys_id": "e2245051533b01103cf7ddeeff7b12d6",
"number": "WRES0001142",
"start": "2022-05-30T04:30:00Z",
"end": "2022-05-30T05:30:00Z",
"sys_created_on": "2022-05-30T04:19:02Z",
"sys_updated_on": "2022-05-30T04:19:04Z",
"source_reservation": null,
"check_in_state": {
"value": "not_required",
"display_value": "Not required"
},
"external_id": null,
"external_ical": null,
"active": true,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"sensitivity": {
"value": "normal",
"display_value": "Normal"
},
"reservation_type": {
"value": "space",
"display_value": "Space"
},
"reservation_subtype": {
"value": "group_parent",
"display_value": "Group parent"
},
"reservation_purpose": {
"value": "meeting",
"display_value": "Meeting"
},
"attendees": null,
"number_of_attendees": 1,
"is_parent": true,
"subject": "Test#52",
"virtual_meeting": null,
"recording_details": [],
"sync_state": {
"value": "not_required",
"display_value": "Synchronization not required"
},
"sub_source": {
"value": "servicenow_workplace_service_delivery",
"display_value": "ServiceNow Workplace Service Delivery"
},
"last_updated_sub_source": {
"value": "servicenow_workplace_service_delivery",
"display_value": "ServiceNow Workplace Service Delivery"
},
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk",
"font_awesome_icon": "fa-desktop",
"reservable_table": "sn_wsd_core_space",
"reservable_filter": "active=true^is_reservable=true^location_type=5f017383eb512010b89bfdfc9c5228c8^building.is_reservable=true^floor.is_reservable=true^EQ",
"short_description": "Reserve a single desks",
"reservable_type": "location",
"require_subject": null,
"require_cancel_notes": false,
"virtual_meeting_provider": {
"sys_id": "e33d9e6853c201103cf7ddeeff7b1205",
"display_value": "Template"
},
"allow_invitees": null,
"display_number_of_attendees": null,
"display_on_behalf_of": "1",
"display_sensitivity": null,
"max_days_in_future": "90",
"allow_whole_day": "1",
"require_whole_day": null,
"selection_type": "unit",
"reservable_container_field": null,
"reservable_quantity_field": null,
"apply_to_shift": null,
"max_occurrences": "90",
"enable_facet_filter": false,
"search_limit": 10000,
"enable_ical_generation": null,
"enable_group_reservations": "1",
"enable_browse_near_a_person": "1",
"enable_browse_by_area": "1",
"display_value": "Desks",
"browse_near_a_person_enabled": true,
"browse_by_area_enabled": true,
"reservable_columns": [
"sys_id",
"external_id",
"email",
"name",
"title",
"description",
"image",
"number",
"site",
"campus",
"building",
"floor",
"area",
"capacity",
"reservable_quantity",
"location_type",
"order",
"requires_check_in",
"is_reservable"
],
"layout_mapping": {
"title": [
"name"
],
"description": [
"description"
],
"subtitle": [
"campus",
"building",
"floor",
"area"
],
"subtitle_asc": [
"area",
"floor",
"building",
"campus"
],
"image": "image",
"body": [
{
"label": "Capacity",
"icon": "fa-users",
"field": "capacity",
"field_to_display": ""
},
{
"label": "Standard services",
"icon": "fa-check",
"field": "standard_services",
"field_to_display": "name"
},
{
"label": "Reservable purposes",
"icon": "fa-tags",
"field": "reservable_purposes",
"field_to_display": "name"
}
]
},
"timeSlots": [
{
"sys_id": "d5331cf2dbb5f01038e42b24ca961906",
"name": "All day",
"short_description": "8am - 6pm",
"slot_start": "08:00",
"slot_end": "18:00"
},
{
"sys_id": "de131cf2dbb5f01038e42b24ca961931",
"name": "Before noon",
"short_description": "8am - 12pm",
"slot_start": "08:00",
"slot_end": "12:00"
},
{
"sys_id": "6e99ab5ddbb930102e8e853e68961929",
"name": "After noon",
"short_description": "1pm - 6pm",
"slot_start": "13:00",
"slot_end": "18:00"
}
],
"buildingSysIds": [
"9e0364cedb3650106c731dcd1396192b"
],
"reservable_views": [
{
"type": "card",
"label": "Card view",
"iconClass": "fa-th-large",
"isDefault": true,
"order": "1"
},
{
"type": "schedule",
"label": "Schedule view",
"iconClass": "fa-calendar-o",
"isDefault": false,
"order": "2"
}
],
"checkin_before_minutes": 30,
"reservation_paths": [
{
"value": "browse_all",
"displayValue": "Browse all"
},
{
"value": "browse_near_a_person",
"displayValue": "Browse near a person"
},
{
"value": "browse_by_area",
"displayValue": "Browse by area"
}
],
"override_approval_policy": "never_required"
},
"notification_recipients": null,
"notification_custom_message": null,
"opened_by": {
"sys_id": "6816f79cc0a8016401c5a33be04be441",
"value": "6816f79cc0a8016401c5a33be04be441",
"displayValue": "System Administrator",
"display_value": "System Administrator",
"name": "System Administrator",
"user_name": "admin",
"table": "sys_user",
"avatar": "c148e1d13741310042106710ce41f149.iix?t=small",
"initials": "SA",
"email": "admin@example.com",
"label": "System Administrator, Finance"
},
"requested_for": {
"sys_id": "6816f79cc0a8016401c5a33be04be441",
"value": "6816f79cc0a8016401c5a33be04be441",
"displayValue": "System Administrator",
"display_value": "System Administrator",
"name": "System Administrator",
"user_name": "admin",
"table": "sys_user",
"avatar": "c148e1d13741310042106710ce41f149.iix?t=small",
"initials": "SA",
"email": "admin@example.com",
"label": "System Administrator, Finance"
},
"edit_restriction": {
"value": "no_restriction",
"display_value": "No restriction"
},
"source": {
"value": "servicenow",
"display_value": "Workplace Services"
},
"source_icon": {
"classNames": "fa fa-calendar-check-o",
"tooltip": "Reservation is confirmed",
"imgSrc": ""
},
"shift": null,
"locations": [
{
"sys_id": "73c2698adb7210106c731dcd13961968",
"name": "B1-03-03",
"description": "Desk reserved for the Team-C. After 10am, free to reserve for everyone.",
"display_value": "B1-03-03",
"capacity": 1,
"label_value": "Workspace/Desk name",
"email": null,
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk"
},
"region": {
"sys_id": "2d626c4edb3650106c731dcd1396194b",
"display_value": "Europe",
"active": true
},
"site": {
"sys_id": "b17220cedb3650106c731dcd1396197a",
"display_value": "Western Europe",
"active": true
},
"campus": {
"sys_id": "44d2e0cedb3650106c731dcd13961988",
"display_value": "Amsterdam Campus",
"active": true
},
"building": {
"sys_id": "9e0364cedb3650106c731dcd1396192b",
"display_value": "AMS-B1",
"active": true,
"timezone": {
"value": "Europe/Amsterdam",
"displayValue": "Europe/Amsterdam"
}
},
"floor": {
"sys_id": "5373a8cedb3650106c731dcd1396198a",
"display_value": "Floor 3",
"active": true
},
"area": {
"sys_id": "410ff04edb7650106c731dcd13961973",
"display_value": "Desks C1",
"active": true
},
"reservation": {
"sys_id": "2a24d0d1533b01103cf7ddeeff7b126b",
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"requested_for": {
"sys_id": "62826bf03710200044e0bfc8bcbe5df1",
"value": "62826bf03710200044e0bfc8bcbe5df1",
"displayValue": "Abel Tuter",
"display_value": "Abel Tuter",
"name": "Abel Tuter",
"user_name": "abel.tuter",
"table": "sys_user",
"avatar": "063e38383730310042106710ce41f13b.iix?t=small",
"initials": "AT",
"email": "abel.tuter@example.com",
"label": "Product Management"
},
"number": "WRES0001143",
"active": true
},
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"number": "WRES0001143",
"requested_for": {
"sys_id": "62826bf03710200044e0bfc8bcbe5df1",
"value": "62826bf03710200044e0bfc8bcbe5df1",
"displayValue": "Abel Tuter",
"display_value": "Abel Tuter",
"name": "Abel Tuter",
"user_name": "abel.tuter",
"table": "sys_user",
"avatar": "063e38383730310042106710ce41f13b.iix?t=small",
"initials": "AT",
"email": "abel.tuter@example.com",
"label": "Product Management"
}
},
{
"sys_id": "32f2a98adb7210106c731dcd13961972",
"name": "B1-03-04",
"description": "Desk reserved for the Team-C. After 10am, free to reserve for everyone.",
"display_value": "B1-03-04",
"capacity": 1,
"label_value": "Workspace/Desk name",
"email": null,
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk"
},
"region": {
"sys_id": "2d626c4edb3650106c731dcd1396194b",
"display_value": "Europe",
"active": true
},
"site": {
"sys_id": "b17220cedb3650106c731dcd1396197a",
"display_value": "Western Europe",
"active": true
},
"campus": {
"sys_id": "44d2e0cedb3650106c731dcd13961988",
"display_value": "Amsterdam Campus",
"active": true
},
"building": {
"sys_id": "9e0364cedb3650106c731dcd1396192b",
"display_value": "AMS-B1",
"active": true,
"timezone": {
"value": "Europe/Amsterdam",
"displayValue": "Europe/Amsterdam"
}
},
"floor": {
"sys_id": "5373a8cedb3650106c731dcd1396198a",
"display_value": "Floor 3",
"active": true
},
"area": {
"sys_id": "410ff04edb7650106c731dcd13961973",
"display_value": "Desks C1",
"active": true
},
"reservation": {
"sys_id": "6a24d0d1533b01103cf7ddeeff7b126e",
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"requested_for": {
"sys_id": "a8f98bb0eb32010045e1a5115206fe3a",
"value": "a8f98bb0eb32010045e1a5115206fe3a",
"displayValue": "Abraham Lincoln",
"display_value": "Abraham Lincoln",
"name": "Abraham Lincoln",
"user_name": "abraham.lincoln",
"table": "sys_user",
"avatar": null,
"initials": "AL",
"email": "abraham.lincoln@example.com",
"label": ""
},
"number": "WRES0001144",
"active": true
},
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"number": "WRES0001144",
"requested_for": {
"sys_id": "a8f98bb0eb32010045e1a5115206fe3a",
"value": "a8f98bb0eb32010045e1a5115206fe3a",
"displayValue": "Abraham Lincoln",
"display_value": "Abraham Lincoln",
"name": "Abraham Lincoln",
"user_name": "abraham.lincoln",
"table": "sys_user",
"avatar": null,
"initials": "AL",
"email": "abraham.lincoln@example.com",
"label": ""
}
}
],
"reservationAcl": {
"write": {
"record": true,
"fields": {
"subject": true,
"sensitivity": true,
"requested_for": true,
"number_of_attendees": true,
"location": true
},
"allFields": true
},
"read": true
}
},
"children": [
{
"sys_id": "2a24d0d1533b01103cf7ddeeff7b126b",
"number": "WRES0001143",
"location": {
"sys_id": "73c2698adb7210106c731dcd13961968",
"name": "B1-03-03",
"description": "Desk reserved for the Team-C. After 10am, free to reserve for everyone.",
"display_value": "B1-03-03",
"capacity": 1,
"label_value": "Workspace/Desk name",
"email": null,
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk"
},
"region": {
"sys_id": "2d626c4edb3650106c731dcd1396194b",
"display_value": "Europe",
"active": true
},
"site": {
"sys_id": "b17220cedb3650106c731dcd1396197a",
"display_value": "Western Europe",
"active": true
},
"campus": {
"sys_id": "44d2e0cedb3650106c731dcd13961988",
"display_value": "Amsterdam Campus",
"active": true
},
"building": {
"sys_id": "9e0364cedb3650106c731dcd1396192b",
"display_value": "AMS-B1",
"active": true,
"timezone": {
"value": "Europe/Amsterdam",
"displayValue": "Europe/Amsterdam"
}
},
"floor": {
"sys_id": "5373a8cedb3650106c731dcd1396198a",
"display_value": "Floor 3",
"active": true
},
"area": {
"sys_id": "410ff04edb7650106c731dcd13961973",
"display_value": "Desks C1",
"active": true
},
"reservation": {
"sys_id": "2a24d0d1533b01103cf7ddeeff7b126b",
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"requested_for": {
"sys_id": "62826bf03710200044e0bfc8bcbe5df1",
"name": "Abel Tuter",
"user_name": "abel.tuter"
},
"number": "WRES0001143",
"active": true
},
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"number": "WRES0001143",
"requested_for": {
"sys_id": "62826bf03710200044e0bfc8bcbe5df1",
"name": "Abel Tuter",
"user_name": "abel.tuter"
}
},
"start": "2022-05-30T04:30:00Z",
"end": "2022-05-30T05:30:00Z",
"sys_created_on": "2022-05-30T04:19:02Z",
"sys_updated_on": "2022-05-30T04:19:04Z",
"source_reservation": {
"sys_id": "e2245051533b01103cf7ddeeff7b12d6",
"display_value": "WRES0001142",
"name": "WRES0001142"
},
"check_in_state": {
"value": "awaiting_check_in",
"display_value": "Awaiting check-in"
},
"external_id": null,
"external_ical": null,
"active": true,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"sensitivity": {
"value": "normal",
"display_value": "Normal"
},
"reservation_type": {
"value": "space",
"display_value": "Space"
},
"reservation_subtype": {
"value": "single",
"display_value": "Single"
},
"reservation_purpose": {
"value": "meeting",
"display_value": "Meeting"
},
"attendees": null,
"number_of_attendees": 1,
"is_parent": false,
"subject": "Test#52",
"virtual_meeting": null,
"recording_details": [],
"sync_state": {
"value": "not_required",
"display_value": "Synchronization not required"
},
"sub_source": {
"value": "servicenow_workplace_service_delivery",
"display_value": "ServiceNow Workplace Service Delivery"
},
"last_updated_sub_source": {
"value": "servicenow_workplace_service_delivery",
"display_value": "ServiceNow Workplace Service Delivery"
},
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk",
"font_awesome_icon": "fa-desktop",
"reservable_table": "sn_wsd_core_space",
"reservable_filter": "active=true^is_reservable=true^location_type=5f017383eb512010b89bfdfc9c5228c8^building.is_reservable=true^floor.is_reservable=true^EQ",
"short_description": "Reserve a single desks",
"reservable_type": "location",
"require_subject": null,
"require_cancel_notes": false,
"virtual_meeting_provider": {
"sys_id": "e33d9e6853c201103cf7ddeeff7b1205",
"display_value": "Template"
},
"allow_invitees": null,
"display_number_of_attendees": null,
"display_on_behalf_of": "1",
"display_sensitivity": null,
"max_days_in_future": "90",
"allow_whole_day": "1",
"require_whole_day": null,
"selection_type": "unit",
"reservable_container_field": null,
"reservable_quantity_field": null,
"apply_to_shift": null,
"max_occurrences": "90",
"enable_facet_filter": false,
"search_limit": 10000,
"enable_ical_generation": null,
"enable_group_reservations": "1",
"enable_browse_near_a_person": "1",
"enable_browse_by_area": "1",
"display_value": "Desks",
"browse_near_a_person_enabled": true,
"browse_by_area_enabled": true,
"reservable_columns": [
"sys_id",
"external_id",
"email",
"name",
"title",
"description",
"image",
"number",
"site",
"campus",
"building",
"floor",
"area",
"capacity",
"reservable_quantity",
"location_type",
"order",
"requires_check_in",
"is_reservable"
],
"layout_mapping": {
"title": [
"name"
],
"description": [
"description"
],
"subtitle": [
"campus",
"building",
"floor",
"area"
],
"subtitle_asc": [
"area",
"floor",
"building",
"campus"
],
"image": "image",
"body": [
{
"label": "Capacity",
"icon": "fa-users",
"field": "capacity",
"field_to_display": ""
},
{
"label": "Standard services",
"icon": "fa-check",
"field": "standard_services",
"field_to_display": "name"
},
{
"label": "Reservable purposes",
"icon": "fa-tags",
"field": "reservable_purposes",
"field_to_display": "name"
}
]
},
"timeSlots": [
{
"sys_id": "d5331cf2dbb5f01038e42b24ca961906",
"name": "All day",
"short_description": "8am - 6pm",
"slot_start": "08:00",
"slot_end": "18:00"
},
{
"sys_id": "de131cf2dbb5f01038e42b24ca961931",
"name": "Before noon",
"short_description": "8am - 12pm",
"slot_start": "08:00",
"slot_end": "12:00"
},
{
"sys_id": "6e99ab5ddbb930102e8e853e68961929",
"name": "After noon",
"short_description": "1pm - 6pm",
"slot_start": "13:00",
"slot_end": "18:00"
}
],
"buildingSysIds": [
"9e0364cedb3650106c731dcd1396192b"
],
"reservable_views": [
{
"type": "card",
"label": "Card view",
"iconClass": "fa-th-large",
"isDefault": true,
"order": "1"
},
{
"type": "schedule",
"label": "Schedule view",
"iconClass": "fa-calendar-o",
"isDefault": false,
"order": "2"
}
],
"checkin_before_minutes": 30,
"reservation_paths": [
{
"value": "browse_all",
"displayValue": "Browse all"
},
{
"value": "browse_near_a_person",
"displayValue": "Browse near a person"
},
{
"value": "browse_by_area",
"displayValue": "Browse by area"
}
],
"override_approval_policy": "never_required"
},
"notification_recipients": null,
"notification_custom_message": null,
"opened_by": {
"sys_id": "6816f79cc0a8016401c5a33be04be441",
"value": "6816f79cc0a8016401c5a33be04be441",
"displayValue": "System Administrator",
"display_value": "System Administrator",
"name": "System Administrator",
"user_name": "admin",
"table": "sys_user",
"avatar": "c148e1d13741310042106710ce41f149.iix?t=small",
"initials": "SA",
"email": "admin@example.com",
"label": "System Administrator, Finance"
},
"requested_for": {
"sys_id": "62826bf03710200044e0bfc8bcbe5df1",
"value": "62826bf03710200044e0bfc8bcbe5df1",
"displayValue": "Abel Tuter",
"display_value": "Abel Tuter",
"name": "Abel Tuter",
"user_name": "abel.tuter",
"table": "sys_user",
"avatar": "063e38383730310042106710ce41f13b.iix?t=small",
"initials": "AT",
"email": "abel.tuter@example.com",
"label": "Product Management"
},
"edit_restriction": {
"value": "fully_restricted",
"display_value": "Fully restricted"
},
"source": {
"value": "servicenow",
"display_value": "Workplace Services"
},
"source_reservation_requester": {
"sys_id": "6816f79cc0a8016401c5a33be04be441",
"name": "System Administrator",
"user_name": "admin"
},
"source_icon": {
"classNames": "fa fa-calendar-check-o",
"tooltip": "Reservation is confirmed",
"imgSrc": ""
},
"shift": null,
"reservationAcl": {
"write": {
"record": true,
"fields": {
"subject": true,
"sensitivity": true,
"requested_for": true,
"number_of_attendees": true,
"location": true
},
"allFields": true
},
"read": true
}
},
{
"sys_id": "6a24d0d1533b01103cf7ddeeff7b126e",
"number": "WRES0001144",
"location": {
"sys_id": "32f2a98adb7210106c731dcd13961972",
"name": "B1-03-04",
"description": "Desk reserved for the Team-C. After 10am, free to reserve for everyone.",
"display_value": "B1-03-04",
"capacity": 1,
"label_value": "Workspace/Desk name",
"email": null,
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk"
},
"region": {
"sys_id": "2d626c4edb3650106c731dcd1396194b",
"display_value": "Europe",
"active": true
},
"site": {
"sys_id": "b17220cedb3650106c731dcd1396197a",
"display_value": "Western Europe",
"active": true
},
"campus": {
"sys_id": "44d2e0cedb3650106c731dcd13961988",
"display_value": "Amsterdam Campus",
"active": true
},
"building": {
"sys_id": "9e0364cedb3650106c731dcd1396192b",
"display_value": "AMS-B1",
"active": true,
"timezone": {
"value": "Europe/Amsterdam",
"displayValue": "Europe/Amsterdam"
}
},
"floor": {
"sys_id": "5373a8cedb3650106c731dcd1396198a",
"display_value": "Floor 3",
"active": true
},
"area": {
"sys_id": "410ff04edb7650106c731dcd13961973",
"display_value": "Desks C1",
"active": true
},
"reservation": {
"sys_id": "6a24d0d1533b01103cf7ddeeff7b126e",
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"requested_for": {
"sys_id": "a8f98bb0eb32010045e1a5115206fe3a",
"name": "Abraham Lincoln",
"user_name": "abraham.lincoln"
},
"number": "WRES0001144",
"active": true
},
"number_of_attendees": 1,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"number": "WRES0001144",
"requested_for": {
"sys_id": "a8f98bb0eb32010045e1a5115206fe3a",
"name": "Abraham Lincoln",
"user_name": "abraham.lincoln"
}
},
"start": "2022-05-30T04:30:00Z",
"end": "2022-05-30T05:30:00Z",
"sys_created_on": "2022-05-30T04:19:02Z",
"sys_updated_on": "2022-05-30T04:19:04Z",
"source_reservation": {
"sys_id": "e2245051533b01103cf7ddeeff7b12d6",
"display_value": "WRES0001142",
"name": "WRES0001142"
},
"check_in_state": {
"value": "awaiting_check_in",
"display_value": "Awaiting check-in"
},
"external_id": null,
"external_ical": null,
"active": true,
"state": {
"value": "confirmed",
"display_value": "Confirmed"
},
"sensitivity": {
"value": "normal",
"display_value": "Normal"
},
"reservation_type": {
"value": "space",
"display_value": "Space"
},
"reservation_subtype": {
"value": "single",
"display_value": "Single"
},
"reservation_purpose": {
"value": "meeting",
"display_value": "Meeting"
},
"attendees": null,
"number_of_attendees": 1,
"is_parent": false,
"subject": "Test#52",
"virtual_meeting": null,
"recording_details": [],
"sync_state": {
"value": "not_required",
"display_value": "Synchronization not required"
},
"sub_source": {
"value": "servicenow_workplace_service_delivery",
"display_value": "ServiceNow Workplace Service Delivery"
},
"last_updated_sub_source": {
"value": "servicenow_workplace_service_delivery",
"display_value": "ServiceNow Workplace Service Delivery"
},
"reservable_module": {
"sys_id": "5db44502dbb650106c731dcd13961937",
"name": "Desks",
"title": "Desks",
"inline_title": "desk",
"font_awesome_icon": "fa-desktop",
"reservable_table": "sn_wsd_core_space",
"reservable_filter": "active=true^is_reservable=true^location_type=5f017383eb512010b89bfdfc9c5228c8^building.is_reservable=true^floor.is_reservable=true^EQ",
"short_description": "Reserve a single desks",
"reservable_type": "location",
"require_subject": null,
"require_cancel_notes": false,
"virtual_meeting_provider": {
"sys_id": "e33d9e6853c201103cf7ddeeff7b1205",
"display_value": "Template"
},
"allow_invitees": null,
"display_number_of_attendees": null,
"display_on_behalf_of": "1",
"display_sensitivity": null,
"max_days_in_future": "90",
"allow_whole_day": "1",
"require_whole_day": null,
"selection_type": "unit",
"reservable_container_field": null,
"reservable_quantity_field": null,
"apply_to_shift": null,
"max_occurrences": "90",
"enable_facet_filter": false,
"search_limit": 10000,
"enable_ical_generation": null,
"enable_group_reservations": "1",
"enable_browse_near_a_person": "1",
"enable_browse_by_area": "1",
"display_value": "Desks",
"browse_near_a_person_enabled": true,
"browse_by_area_enabled": true,
"reservable_columns": [
"sys_id",
"external_id",
"email",
"name",
"title",
"description",
"image",
"number",
"site",
"campus",
"building",
"floor",
"area",
"capacity",
"reservable_quantity",
"location_type",
"order",
"requires_check_in",
"is_reservable"
],
"layout_mapping": {
"title": [
"name"
],
"description": [
"description"
],
"subtitle": [
"campus",
"building",
"floor",
"area"
],
"subtitle_asc": [
"area",
"floor",
"building",
"campus"
],
"image": "image",
"body": [
{
"label": "Capacity",
"icon": "fa-users",
"field": "capacity",
"field_to_display": ""
},
{
"label": "Standard services",
"icon": "fa-check",
"field": "standard_services",
"field_to_display": "name"
},
{
"label": "Reservable purposes",
"icon": "fa-tags",
"field": "reservable_purposes",
"field_to_display": "name"
}
]
},
"timeSlots": [
{
"sys_id": "d5331cf2dbb5f01038e42b24ca961906",
"name": "All day",
"short_description": "8am - 6pm",
"slot_start": "08:00",
"slot_end": "18:00"
},
{
"sys_id": "de131cf2dbb5f01038e42b24ca961931",
"name": "Before noon",
"short_description": "8am - 12pm",
"slot_start": "08:00",
"slot_end": "12:00"
},
{
"sys_id": "6e99ab5ddbb930102e8e853e68961929",
"name": "After noon",
"short_description": "1pm - 6pm",
"slot_start": "13:00",
"slot_end": "18:00"
}
],
"buildingSysIds": [
"9e0364cedb3650106c731dcd1396192b"
],
"reservable_views": [
{
"type": "card",
"label": "Card view",
"iconClass": "fa-th-large",
"isDefault": true,
"order": "1"
},
{
"type": "schedule",
"label": "Schedule view",
"iconClass": "fa-calendar-o",
"isDefault": false,
"order": "2"
}
],
"checkin_before_minutes": 30,
"reservation_paths": [
{
"value": "browse_all",
"displayValue": "Browse all"
},
{
"value": "browse_near_a_person",
"displayValue": "Browse near a person"
},
{
"value": "browse_by_area",
"displayValue": "Browse by area"
}
],
"override_approval_policy": "never_required"
},
"notification_recipients": null,
"notification_custom_message": null,
"opened_by": {
"sys_id": "6816f79cc0a8016401c5a33be04be441",
"value": "6816f79cc0a8016401c5a33be04be441",
"displayValue": "System Administrator",
"display_value": "System Administrator",
"name": "System Administrator",
"user_name": "admin",
"table": "sys_user",
"avatar": "c148e1d13741310042106710ce41f149.iix?t=small",
"initials": "SA",
"email": "admin@example.com",
"label": "System Administrator, Finance"
},
"requested_for": {
"sys_id": "a8f98bb0eb32010045e1a5115206fe3a",
"value": "a8f98bb0eb32010045e1a5115206fe3a",
"displayValue": "Abraham Lincoln",
"display_value": "Abraham Lincoln",
"name": "Abraham Lincoln",
"user_name": "abraham.lincoln",
"table": "sys_user",
"avatar": null,
"initials": "AL",
"email": "abraham.lincoln@example.com",
"label": ""
},
"edit_restriction": {
"value": "fully_restricted",
"display_value": "Fully restricted"
},
"source": {
"value": "servicenow",
"display_value": "Workplace Services"
},
"source_reservation_requester": {
"sys_id": "6816f79cc0a8016401c5a33be04be441",
"name": "System Administrator",
"user_name": "admin"
},
"source_icon": {
"classNames": "fa fa-calendar-check-o",
"tooltip": "Reservation is confirmed",
"imgSrc": ""
},
"shift": null,
"reservationAcl": {
"write": {
"record": true,
"fields": {
"subject": true,
"sensitivity": true,
"requested_for": true,
"number_of_attendees": true,
"location": true
},
"allFields": true
},
"read": true
}
}
]
}
}
WSD 그룹 예약 - 패치 /api/sn_wsd_rsv/group_reservation/cancel/{id}
지정된 그룹 예약을 취소합니다.
URL 형식
버전이 지정된 URL: / api/sn_wsd_rsv/{api_version}/group_reservation/cancel/{id}
기본 URL: / api/sn_wsd_rsv/group_reservation/cancel/{id}
지원되는 요청 매개변수
| 이름 | 설명 |
|---|---|
| api_version | 옵션입니다. 액세스할 엔드포인트의 버전입니다. 예를 들면 v1 또는 v2입니다. 최신 버전이 아닌 엔드포인트 버전을 사용하려면 이 값만 지정합니다. 데이터 유형: 문자열 |
| ID | 상위 예약 기록의 Sys_id입니다. 직장 예약[sn_wsd_rsv_reservation] 테이블에 있습니다. 그룹 예약이 생성되면 한 개의 그룹 상위 기록과 하나 이상의 하위 예약 기록이 생성됩니다. 예약 기록에는 예약 기록의 유형을 나타내는 reservation_subtype라는 필드가 포함되어 있습니다. 그룹 상위 기록의 경우 이 필드는 그룹 상위 기록임을 나타내기 위해 "그룹 상위"로 설정됩니다. 하위 기록의 경우 이 필드는 "단일"로 설정됩니다. 하위 기록 내에서 연결된 상위 예약 기록의 sys_id source_reservation 필드에 있습니다. 데이터 유형: 문자열 |
| 이름 | 설명 |
|---|---|
| 없음 |
| 이름 | 설명 |
|---|---|
| cancel_notes | 예약 취소 이유입니다. 데이터 유형: 문자열 기본값: "그룹 취소를 통해 취소된 예약" |
헤더
다음 요청 및 응답 헤더는 이 HTTP 작업에만 적용되거나 이 작업에 고유한 방식으로 적용됩니다. REST API에서 사용되는 일반 헤더 목록은 지원되는 REST API 헤더를 참조하세요.
| 헤더 | 설명 |
|---|---|
| 수용 | 요청 본문의 데이터 형식입니다. 지원되는 유형: application/json, 또는, text/xmlapplication/xml . 기본값: application/json |
| 컨텐츠-형식 | 요청 본문의 데이터 형식입니다. application/json만 지원합니다. |
| 헤더 | 설명 |
|---|---|
| 없음 |
상태 코드
다음 상태 코드는 이 HTTP 작업에 적용됩니다. REST API에서 사용할 수 있는 상태 코드 목록은 REST API HTTP 응답 코드를 참조하세요.
| 상태 코드 | 설명 |
|---|---|
| 200 | 성공입니다. 요청이 성공적으로 처리되었습니다. |
| 400 | 잘못된 요청입니다. 상위 예약sys_id 잘못되었거나 제공되지 않았습니다. |
| 401 | 승인되지 않았습니다. 사용자 자격 증명이 잘못되었거나 전달되지 않았습니다. |
| 404 | 접근이 거부되었습니다. 그룹 예약을 취소할 수 없습니다. 사용자에게 요청된 그룹 예약을 취소할 수 있는 권한이 없습니다. |
| 500 | 내부 서버 오류입니다. 요청을 처리하는 동안 예기치 않은 오류가 발생했습니다. 응답에는 오류에 대한 추가 정보가 포함되어 있습니다. |
응답 본문 매개변수
| 이름 | 설명 |
|---|---|
| 결과 | 그룹 예약 취소 요청의 결과입니다. 데이터 유형: 객체 |
| result.allChildrenCanceled | 그룹 예약과 연결된 모든 하위 예약이 성공적으로 취소되었는지 여부를 나타내는 플래그입니다. 가능한 값:
데이터 유형: 부울 |
| 결과.취소된 상위 | 그룹 예약에 대한 상위 예약이 성공적으로 취소되었는지 여부를 나타내는 플래그입니다. 가능한 값:
데이터 유형: 부울 |
| result.canceledReservations | 성공적으로 취소된 하위 예약의 sys_ids 목록입니다. 데이터 유형: 배열 |
| result.failedChildMeetings | 취소되지 않은 하위 예약의 sys_ids 목록입니다. 데이터 유형: 배열 |
| result.msg | 예약을 취소하지 못한 경우 이 매개 변수에는 실패 원인에 대한 메시지가 포함됩니다. 데이터 유형: 문자열 |
| 결과.상위 | 취소된 상위 예약의 Sys_id입니다. 데이터 유형: 문자열 |
| 결과.성공 | 그룹 예약이 성공적으로 취소되었는지 여부를 나타내는 플래그입니다. 가능한 값:
데이터 유형: 부울 |
| result.user_msg | 나중에 사용하기 위해 예약되어 있습니다. 예약을 취소하지 못한 경우 이 매개변수에는 UI에 표시할 수 있는 실패 원인에 대한 번역된 메시지가 포함됩니다. 데이터 유형: 문자열 |
cURL 요청
다음 코드 예제에서는 그룹 예약을 취소하는 방법을 보여 줍니다.
curl "http://instance.servicenow.com/api/sn_wsd_rsv/group_reservation/cancel/22c1aee353af01103cf7ddeeff7b12d5" \
--request PATCH \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
\"cancel_notes\":\"Need to postpone until next quarter\"
}" \
--user 'username':'password'
반환 결과:
{
"result": {
"success": true,
"canceledReservations": [
"6ec1aee353af01103cf7ddeeff7b12d8",
"aac1aee353af01103cf7ddeeff7b12db"
],
"failedChildMeetings": [],
"cancelledParent": true,
"allChildrenCanceled": true,
"msg": "",
"user_msg": "",
"parent": "22c1aee353af01103cf7ddeeff7b12d5"
}
}
WSD 그룹 예약 - 패치 /api/sn_wsd_rsv/group_reservation/update/{id}
지정된 그룹 예약을 업데이트합니다.
- 제목
- 시작 날짜 및 시간
- 종료 날짜 및 시간
- 예약과 관련된 교대조
- 하위 예약의 직장 위치
URL 형식
버전이 지정된 URL: /api/sn_wsd_rsv/{api_version}/ group_reservation/update/{id}
기본 URL: / api/sn_wsd_rsv/group_reservation/update/{id}
지원되는 요청 매개변수
| 이름 | 설명 |
|---|---|
| api_version | 옵션입니다. 액세스할 엔드포인트의 버전입니다. 예를 들면 v1 또는 v2입니다. 최신 버전이 아닌 엔드포인트 버전을 사용하려면 이 값만 지정합니다. 데이터 유형: 문자열 |
| ID | 상위 예약 기록의 Sys_id입니다. 직장 예약[sn_wsd_rsv_reservation] 테이블에 있습니다. 그룹 예약이 생성되면 한 개의 그룹 상위 기록과 하나 이상의 하위 예약 기록이 생성됩니다. 예약 기록에는 예약 기록의 유형을 나타내는 reservation_subtype라는 필드가 포함되어 있습니다. 그룹 상위 기록의 경우 이 필드는 그룹 상위 기록임을 나타내기 위해 "그룹 상위"로 설정됩니다. 하위 기록의 경우 이 필드는 "단일"로 설정됩니다. 하위 기록 내에서 연결된 상위 예약 기록의 sys_id source_reservation 필드에 있습니다. 데이터 유형: 문자열 |
| 이름 | 설명 |
|---|---|
| 없음 |
| 이름 | 설명 |
|---|---|
| 하위 | 예약과 연결할 하위 예약 기록 목록이 업데이트되었습니다. 데이터 유형: 객체 배열 |
| children.is_private | 예약이 비공개인지 여부를 나타내는 플래그입니다. 비공개인 경우 예약은 소유자를 제외한 다른 사람에게 표시되지 않습니다. 이러한 개인 정보 설정에 대한 자세한 내용은 위치 개인 정보 설정 및 영향을 참조하세요. 유효한 값은 다음과 같습니다.
데이터 유형: 부울 기본값: 시스템 속성에서 개인정보 보호를 위해 설정된 값입니다. |
| children.location | 예약할 위치의 sys_id 업데이트되었습니다. 직장 위치[sn_wsd_core_workplace_location] 테이블에 있습니다. 데이터 유형: 문자열 |
| children.requested_for | 예약이 요청되는 사용자의 업데이트된 sys_id입니다. 사용자 [sys_user] 테이블에 있습니다. 데이터 유형: 문자열 |
| 종료 | 예약 종료 시간이 업데이트되었습니다. 데이터 유형: 문자열 형식: UTC 또는 현지 시간(yyyy-mm-dd hh:mm:ss) |
| requested_for | 예약이 이루어지는 사용자의 Sys_id 또는 이메일 주소입니다. 사용자 [sys_user] 테이블에 있습니다. 데이터 유형: 문자열 |
| reservable_module | 필수 예약과 연결할 예약 가능한 모듈의 Sys_id입니다. 예약 가능한 모듈은 예약 에 필요한 직장 항목을 정의합니다. 예약 가능한 모듈 [sn_wsd_rsv_reservable_module] 테이블에 있습니다. 데이터 유형: 문자열 |
| Shift | 예약과 연결할 교대조의 sys_id 업데이트합니다. 교대조 [sn_wsd_core_shift] 테이블에 있습니다. 교대조 기반 예약에 대한 자세한 내용은 교대조 기반 예약 사용을 참조하세요. 데이터 유형: 문자열 |
| 시작 | 업데이트된 예약 시작 시간입니다. 데이터 유형: 문자열 형식: UTC 또는 현지 시간(yyyy-mm-dd hh:mm:ss) 기본값: 비어 있음 - 하위 예약에 시작 시간이 지정됨 |
| 제목 | 예약과 관련된 회의의 업데이트된 주제입니다. 데이터 유형: 문자열 기본값: 비어 있음 |
| workplace_location | 그룹 예약과 연결할 직장 위치의 sys_id 업데이트되었습니다. 직장 위치[sn_wsd_core_workplace_location] 테이블에 있습니다. 데이터 유형: 문자열 기본값: 비어 있음 - 하위 예약에 위치가 지정됨 |
헤더
다음 요청 및 응답 헤더는 이 HTTP 작업에만 적용되거나 이 작업에 고유한 방식으로 적용됩니다. REST API에서 사용되는 일반 헤더 목록은 지원되는 REST API 헤더를 참조하세요.
| 헤더 | 설명 |
|---|---|
| 수용 | 요청 본문의 데이터 형식입니다. 지원되는 유형: application/json, 또는, text/xmlapplication/xml . 기본값: application/json |
| 컨텐츠-형식 | 요청 본문의 데이터 형식입니다. application/json만 지원합니다. |
| 헤더 | 설명 |
|---|---|
| 없음 |
상태 코드
다음 상태 코드는 이 HTTP 작업에 적용됩니다. REST API에서 사용할 수 있는 상태 코드 목록은 REST API HTTP 응답 코드를 참조하세요.
| 상태 코드 | 설명 |
|---|---|
| 200 | 성공입니다. 요청이 성공적으로 처리되었습니다. |
| 400 | 잘못된 요청입니다. 잘못된 요청 유형 또는 잘못된 형식의 요청이 탐지되었습니다. |
| 401 | 승인되지 않았습니다. 사용자 자격 증명이 잘못되었거나 전달되지 않았습니다. |
| 500 | 내부 서버 오류입니다. 요청을 처리하는 동안 예기치 않은 오류가 발생했습니다. 응답에는 오류에 대한 추가 정보가 포함되어 있습니다. |
응답 본문 매개변수
| 이름 | 설명 |
|---|---|
| 결과 | 다중 예약 생성 또는 업데이트의 결과를 반환합니다. 데이터 유형: 객체 |
| 결과.상위 | 업데이트된 상위 예약의 Sys_id입니다. 데이터 유형: 문자열 |
| 결과.성공 | 예약이 성공적으로 생성되었는지 여부를 나타내는 플래그입니다. 가능한 값:
데이터 유형: 부울 |
| result.successfulReservations | 성공적으로 업데이트된 예약 목록입니다. 데이터 유형: 배열 |
| result.successfulReservations.msg | 업데이트에 대한 내부 메시지입니다. 작업에 대한 기술 정보를 제공합니다. 데이터 유형: 문자열 |
| result.successfulReservations.operation | 수행된 작업의 유형입니다(예: 만들기 또는 업데이트). 추가된 회의실 등 새 예약 가능한 항목이 그룹 예약에 추가되면 이 값은 생성으로 반환되며, 그렇지 않으면 업데이트로 설정됩니다. 데이터 유형: 문자열 |
| result.successfulReservations.sys_id | 생성된 예약의 Sys_id입니다. 직장 예약[sn_wsd_rsv_reservation] 테이블에 있습니다. 데이터 유형: 문자열 |
| result.successfulReservations.user_msg | 업데이트에 대한 사용자 메시지입니다. 이 메시지는 사용자의 언어 기본 설정에 따라 번역될 수 있으며 UI에 나타나는 메시지여야 합니다. 데이터 유형: 문자열 |
| result.unSuccessfulReservations | 업데이트에 실패한 예약 목록입니다. 데이터 유형: 배열 |
| result.unSuccessfulReservations.msg | 업데이트 오류에 대한 메시지입니다. 데이터 유형: 문자열 |
| result.unSuccessfulReservations.operation | 수행된 작업의 유형입니다(예: 만들기 또는 업데이트). 데이터 유형: 문자열 |
| result.unSuccessfulReservations.sys_id | 생성된 예약의 Sys_id입니다. 직장 예약[sn_wsd_rsv_reservation] 테이블에 있습니다. 데이터 유형: 문자열 |
| result.unSuccessfulReservations.user_msg | 업데이트 오류에 대한 메시지입니다. 데이터 유형: 문자열 |
cURL 요청
다음 예제에서는 이 끝점을 호출하여 그룹 예약을 업데이트하는 방법을 보여 줍니다.
curl "http://instance.servicenow.com/api/sn_wsd_rsv/group_reservation/update/b84e218a87586550cfaa99b73cbb35ec" \
--request PATCH \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
\"reservable_module\": \"5db44502dbb650106c731dcd13961937\",
\"subject\": \"Test-123\",
\"reservation_purpose\": \"meeting\",
\"timezone\": \"US/Pacific\",
\"children\": [
{
\"location\": \"6a11a94adb7210106c731dcd1396194e\",
\"requested_for\": \"62826bf03710200044e0bfc8bcbe5df1\",
\"is_private\": false
},
{
\"location\": \"9841e94adb7210106c731dcd13961914\",
\"requested_for\": \"6816f79cc0a8016401c5a33be04be441\",
\"is_private\": false
}
],
\"start\": \"2023-02-12T11:30:00Z\",
\"end\": \"2023-02-12T12:30:00Z\"
}" \
반환 결과:
{
"result": {
"parent": "b84e218a87586550cfaa99b73cbb35ec",
"success": true,
"successfulReservations": [
{
"operation": "create",
"sys_id": "7b9e658a87586550cfaa99b73cbb357d",
"msg": "",
"user_msg": null,
"location": "6a11a94adb7210106c731dcd1396194e"
},
{
"operation": "create",
"sys_id": "3b9e658a87586550cfaa99b73cbb3580",
"msg": "",
"user_msg": null,
"location": "9841e94adb7210106c731dcd13961914"
}
],
"unSuccessfulReservations": []
}
}
WSD 그룹 예약 - POST /api/sn_wsd_rsv/group_reservation/add
그룹 예약을 생성합니다.
URL 형식
버전이 지정된 URL: / api/sn_wsd_rsv/{api_version}/group_reservation/add
기본 URL: / api/sn_wsd_rsv/group_reservation/add
지원되는 요청 매개변수
| 이름 | 설명 |
|---|---|
| api_version | 옵션입니다. 액세스할 엔드포인트의 버전입니다. 예를 들면 v1 또는 v2입니다. 최신 버전이 아닌 엔드포인트 버전을 사용하려면 이 값만 지정합니다. 데이터 유형: 문자열 |
| 이름 | 설명 |
|---|---|
| 없음 |
| 이름 | 설명 |
|---|---|
| 하위 | 필수 예약과 연결할 하위 예약 기록의 목록입니다. 데이터 유형: 객체 배열 |
| children.is_private | 예약이 비공개인지 여부를 나타내는 플래그입니다. 비공개인 경우 예약은 소유자를 제외한 다른 사람에게 표시되지 않습니다. 이러한 개인 정보 설정에 대한 자세한 내용은 위치 개인 정보 설정 및 영향을 참조하세요. 유효한 값은 다음과 같습니다.
데이터 유형: 부울 기본값: 시스템 속성에서 개인정보 보호를 위해 설정된 값입니다. |
| children.location | 필수 예약할 위치의 Sys_id입니다. 직장 위치[sn_wsd_core_workplace_location] 테이블에 있습니다. 데이터 유형: 문자열 |
| children.requested_for | 필수 예약을 요청 중인 사용자의 Sys_id입니다. 사용자 [sys_user] 테이블에 있습니다. 데이터 유형: 문자열 |
| 종료 | 매개 변수가 전달되지 않은 경우 shift 필요합니다. 요청된 예약 종료 시간입니다. 데이터 유형: 문자열 형식: UTC 또는 현지 시간(yyyy-mm-dd hh:mm:ss) |
| requested_for | 예약이 이루어지는 사용자의 Sys_id 또는 이메일 주소입니다. 사용자 [sys_user] 테이블에 있습니다. 데이터 유형: 문자열 |
| reservable_module | 필수 예약과 연결할 예약 가능한 모듈의 Sys_id입니다. 예약 가능한 모듈은 예약 에 필요한 직장 항목을 정의합니다. 예약 가능한 모듈 [sn_wsd_rsv_reservable_module] 테이블에 있습니다. 데이터 유형: 문자열 |
| Shift | 예약과 연결할 교대조의 Sys_id입니다. 교대조 [sn_wsd_core_shift] 테이블에 있습니다. 이 매개 변수가 전달 end 되면 매개 변수가 필요하지 않습니다. 교대조 기반 예약에 대한 자세한 내용은 교대조 기반 예약 사용을 참조하세요. 데이터 유형: 문자열 |
| 시작 | 필수 요청된 예약 시작 시간입니다. 데이터 유형: 문자열 형식: UTC 또는 현지 시간(yyyy-mm-dd hh:mm:ss) |
| 제목 | 필수 예약과 연결된 회의의 주제입니다. 데이터 유형: 문자열 |
| workplace_location | 그룹 예약과 연결할 직장 위치의 Sys_id입니다. 직장 위치[sn_wsd_core_workplace_location] 테이블에 있습니다. 데이터 유형: 문자열 기본값: 비어 있음 - 하위 예약에 위치가 지정됨 |
헤더
다음 요청 및 응답 헤더는 이 HTTP 작업에만 적용되거나 이 작업에 고유한 방식으로 적용됩니다. REST API에서 사용되는 일반 헤더 목록은 지원되는 REST API 헤더를 참조하세요.
| 헤더 | 설명 |
|---|---|
| 수용 | 요청 본문의 데이터 형식입니다. 지원되는 유형: application/json, 또는, text/xmlapplication/xml . 기본값: application/json |
| 컨텐츠-형식 | 요청 본문의 데이터 형식입니다. application/json만 지원합니다. |
| 헤더 | 설명 |
|---|---|
| 없음 |
상태 코드
다음 상태 코드는 이 HTTP 작업에 적용됩니다. REST API에서 사용할 수 있는 상태 코드 목록은 REST API HTTP 응답 코드를 참조하세요.
| 상태 코드 | 설명 |
|---|---|
| 200 | 성공입니다. 요청이 성공적으로 처리되었습니다. |
| 400 | 잘못된 요청입니다. 잘못된 요청 유형 또는 잘못된 형식의 요청이 탐지되었습니다. |
| 401 | 승인되지 않았습니다. 사용자 자격 증명이 잘못되었거나 전달되지 않았습니다. |
| 500 | 내부 서버 오류입니다. 요청을 처리하는 동안 예기치 않은 오류가 발생했습니다. 응답에는 오류에 대한 추가 정보가 포함되어 있습니다. |
응답 본문 매개변수
| 이름 | 설명 |
|---|---|
| 결과 | 생성된 그룹 예약에 대한 상세 정보입니다. 데이터 유형: 객체 |
| result.created_children | 생성된 하위 예약에 대한 상세 정보입니다. 데이터 유형: 객체 배열 |
| result.created_children.위치 | 예약할 위치의 Sys_id입니다. 직장 위치[sn_wsd_core_workplace_location] 테이블에 있습니다. 데이터 유형: 문자열 |
| result.created_children.requested_for | 하위 예약이 생성된 사용자의 Sys_id입니다. 데이터 유형: 문자열 |
| result.created_children.sys_id | 생성된 하위 예약 기록의 Sys_id입니다. 데이터 유형: 문자열 |
| result.failed_children | 생성하지 못한 하위 예약에 대한 상세 정보입니다. 데이터 유형: 객체 배열 |
| result.failed_children.위치 | 실패한 예약과 연결된 위치 기록의 Sys_id입니다. 데이터 유형: 문자열 |
| result.failed_children.requested_for | 하위 예약이 요청된 사용자의 Sys_id입니다. 데이터 유형: 문자열 |
| result.failed_children.sys_id | 항상 -1입니다. 데이터 유형: 문자열 |
| result.msg | 요청이 실패하면 오류를 설명하는 메시지입니다. 데이터 유형: 문자열 |
| 결과.상위 | 상위 예약 기록의 Sys_id입니다. 직장 예약[sn_wsd_rsv_reservation] 테이블에 있습니다. 그룹 예약이 생성되면 한 개의 그룹 상위 기록과 하나 이상의 하위 예약 기록이 생성됩니다. 예약 기록에는 예약 기록의 유형을 나타내는 reservation_subtype라는 필드가 포함되어 있습니다. 그룹 상위 기록의 경우 이 필드는 그룹 상위 기록임을 나타내기 위해 "그룹 상위"로 설정됩니다. 하위 기록의 경우 이 필드는 "단일"로 설정됩니다. 하위 기록 내에서 연결된 상위 예약 기록의 sys_id source_reservation 필드에 있습니다. 데이터 유형: 문자열 |
| 결과.성공 | 예약이 성공적으로 생성되었는지 여부를 나타내는 플래그입니다. 가능한 값:
데이터 유형: 부울 |
| result.userMsg | 요청이 실패하면 오류를 설명하는 메시지입니다. 데이터 유형: 문자열 |
cURL 요청
다음 코드 예제에서는 이 끝점을 사용하여 그룹 예약을 만드는 방법을 보여 줍니다.
curl "http://instance.servicenow.com/api/sn_wsd_rsv/group_reservation/add" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
\"reservable_module\": \"5db44502dbb650106c731dcd13961937\",
\"subject\": \"Test-123\",
\"reservation_purpose\": \"meeting\",
\"timezone\": \"US/Pacific\",
\"children\": [
{
\"location\": \"6a11a94adb7210106c731dcd1396194e\",
\"requested_for\": \"62826bf03710200044e0bfc8bcbe5df1\",
\"is_private\": false
},
{
\"location\": \"9841e94adb7210106c731dcd13961914\",
\"requested_for\": \"6816f79cc0a8016401c5a33be04be441\",
\"is_private\": false
}
],
\"start\": \"2023-01-12T11:30:00Z\",
\"end\": \"2023-01-12T12:30:00Z\"
}" \
--user 'username':'password'
반환 결과:
{
"result": {
"parent": "b84e218a87586550cfaa99b73cbb35ec",
"success": true,
"created_children": [
{
"sys_id": "7c4e218a87586550cfaa99b73cbb35ee",
"location": "6a11a94adb7210106c731dcd1396194e",
"requested_for": "62826bf03710200044e0bfc8bcbe5df1"
},
{
"sys_id": "3c4e218a87586550cfaa99b73cbb35f1",
"location": "9841e94adb7210106c731dcd13961914",
"requested_for": "6816f79cc0a8016401c5a33be04be441"
}
],
"failed_children": [],
"user_msg": "",
"msg": ""
}
}