기록 생성

  • 릴리스 버전: Xanadu
  • 업데이트 날짜 2024년 08월 01일
  • 읽기4분
  • 지정된 테이블에 단일 기록을 삽입합니다.

    시작하기 전에

    필요한 역할: sn_cli_metadata.cli_admin, sn_cli_metadata.cli_user 또는 admin

    이 태스크 정보

    주:
    이 명령을 사용하여 여러 기록을 삽입할 수 없습니다.

    프로시저

    시스템의 명령줄 도구를 열고 이 명령을 실행합니다.
    $ snc record create [--table table --data data]

    이러한 인수의 값을 전달합니다.

    매개변수 설명
    테이블 필수 기록을 저장할 테이블의 이름입니다.
    데이터 필수 지정된 기록에서 정의할 각 필드의 필드 이름 및 관련 값(JSON 문자열 형식)입니다.

    결과

    시스템은 지정된 테이블에 기록을 생성하고 새 기록의 필드-값 쌍을 반환합니다.

    $ snc record create --table incident, --data "{'short_description': 'Unable to open file', 'impact':'3'}"

    시스템이 JSON 형식으로 기록을 반환합니다.

    {
       "result": {
          "active": "true",
          "activity_due": "",
          "additional_assignee_list": "",
          "approval": "not requested",
          "approval_history": "",
          "approval_set": "",
          "assigned_to": "",
          "assignment_group": "",
          "business_duration": "",
          "business_service": "",
          "business_stc": "",
          "calendar_duration": "",
          "calendar_stc": "",
          "caller_id": "",
          "category": "inquiry",
          "caused_by": "",
          "child_incidents": "0",
          "close_code": "",
          "close_notes": "",
          "closed_at": "",
          "closed_by": "",
          "cmdb_ci": "",
          "comments": "",
          "comments_and_work_notes": "",
          "company": "",
          "contact_type": "",
          "contract": "",
          "correlation_display": "",
          "correlation_id": "",
          "delivery_plan": "",
          "delivery_task": "",
          "description": "",
          "due_date": "",
          "escalation": "0",
          "expected_start": "",
          "follow_up": "",
          "group_list": "",
          "hold_reason": "",
          "impact": "3",
          "incident_state": "1",
          "knowledge": "false",
          "location": "",
          "made_sla": "true",
          "notify": "1",
          "number": "INC0010005",
          "opened_at": "2021-01-27 22:49:11",
          "opened_by": {
             "link": "https://my-instance.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
             "value": "6816f79cc0a8016401c5a33be04be441"
          },
          "order": "",
          "parent": "",
          "parent_incident": "",
          "priority": "5",
          "problem_id": "",
          "reassignment_count": "0",
          "reopen_count": "0",
          "reopened_by": "",
          "reopened_time": "",
          "resolved_at": "",
          "resolved_by": "",
          "rfc": "",
          "route_reason": "",
          "service_offering": "",
          "severity": "3",
          "short_description": "Unable to open file",
          "sla_due": "",
          "state": "1",
          "subcategory": "",
          "sys_class_name": "incident",
          "sys_created_by": "admin",
          "sys_created_on": "2021-01-27 22:49:11",
          "sys_domain": {
             "link": "https://my-instance.service-now.com/api/now/table/sys_user_group/global",
             "value": "global"
          },
          "sys_domain_path": "/",
          "sys_id": "6a6a4f5cdbcae850d7055268dc9619d4",
          "sys_mod_count": "0",
          "sys_tags": "",
          "sys_updated_by": "admin",
          "sys_updated_on": "2021-01-27 22:49:11",
          "task_effective_number": "INC0010005",
          "time_worked": "",
          "universal_request": "",
          "upon_approval": "proceed",
          "upon_reject": "cancel",
          "urgency": "3",
          "user_input": "",
          "watch_list": "",
          "work_end": "",
          "work_notes": "",
          "work_notes_list": "",
          "work_start": ""
       }
    }