GetTicketTemplate

Updated at:

Retrieves the definition information of a ticket template.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

TemplateId

string

No

The template ID.

4ca2e2-c8d19b82c-d7ce393ac8197d3ab

InstanceId

string

Yes

The instance ID.

ccc-test

TemplateVersion

string

No

The template version.

1703517780627

Response elements

Element

Type

Description

Example

object

GetTicketTemplateResponse

Data

object

The data.

InstanceId

string

The instance ID.

ccc-test

TemplateId

string

The template ID.

4ca2e2-c8d19b82c-d7ce393ac8197d3ab

Name

string

The template name.

Test template

State

string

The status code.

Enabled

Editor

string

The template editor.

editor-xxx@ccc-test

CategoryId

string

The ticket category ID.

43c2671b-****-4223-86d0-6bd187905cc8

TicketFields

array<object>

The list of template fields.

object

The template field.

DisplayName

string

The display name.

Name

Description

string

The description.

Name description

Name

string

The name.

name

DataType

string

The data type.

string

Pattern

string

The regular expression validation rule.

^

PatternErrorMessage

string

The error message for regular expression validation.

Not a valid email address

MinLength

integer

The minimum length.

1

MaxLength

integer

The maximum length.

30

Minimum

number

The minimum numeric value.

1

Maximum

number

The maximum numeric value.

10

Required

boolean

Specifies whether the field is required.

false

System

boolean

Specifies whether the field is a system field.

false

Disabled

boolean

Specifies whether the field is disabled.

false

Array

boolean

Specifies whether the field is an array.

false

ReadOnly

boolean

Specifies whether the field is read-only.

false

EditorType

string

The editor type.

textbox

Attributes

string

The extended attributes.

{}

DisplayOrder

integer

The display order in the list.

1

CreatedTime

integer

The creation time. The value is a UNIX timestamp in milliseconds.

1717664210000

UpdatedTime

integer

The update time. The value is a UNIX timestamp in milliseconds.

1717664210000

Creator

string

The creator.

creator@cccV2-kmz

ProcessDefinition

string

The process information.

[{"id":"TICKET_START","name":"Start","nodeIndex":0,"properties":{"position":{"x":250,"y":200}},"type":"TICKET_START","events":[{"edgeId":"8bd07339","sourceAnchor":0,"next":"APPROVAL__JNBSSREc","targetAnchor":0}]},{"id":"TICKET_FINISH","name":"End","nodeIndex":9999,"properties":{"position":{"x":767,"y":206}},"type":"TICKET_FINISH","events":[]},{"id":"APPROVAL__JNBSSREc","name":"Process node","nodeIndex":1,"properties":{"skillGroupId":"chat001@cccV2-kmz","position":{"x":537,"y":164.5}},"type":"APPROVAL","events":[{"edgeId":"74031613","sourceAnchor":1,"next":"TICKET_FINISH","targetAnchor":0}]}]

UpdatedTime

integer

The last modification time. The value is a UNIX timestamp in milliseconds.

1717664210000

RequestId

string

The request ID.

BF268B34-09C2-43FD-BAC4-5D31EA633111

HttpStatusCode

integer

The HTTP status code.

200

Code

string

The response code.

OK

Message

string

The response message.

None

Params

array

The list of error parameters.

string

The error parameter.

None

Examples

Success response

JSON format

{
  "Data": {
    "InstanceId": "ccc-test",
    "TemplateId": "4ca2e2-c8d19b82c-d7ce393ac8197d3ab\n",
    "Name": "测试模板。\n\n",
    "State": "Enabled",
    "Editor": "editor-xxx@ccc-test",
    "CategoryId": "43c2671b-****-4223-86d0-6bd187905cc8",
    "TicketFields": [
      {
        "DisplayName": "姓名",
        "Description": "姓名描述",
        "Name": "name",
        "DataType": "string",
        "Pattern": "^",
        "PatternErrorMessage": "不是有效的email地址\n",
        "MinLength": 1,
        "MaxLength": 30,
        "Minimum": 1,
        "Maximum": 10,
        "Required": false,
        "System": false,
        "Disabled": false,
        "Array": false,
        "ReadOnly": false,
        "EditorType": "textbox",
        "Attributes": "{}",
        "DisplayOrder": 1,
        "CreatedTime": 1717664210000,
        "UpdatedTime": 1717664210000,
        "Creator": "creator@cccV2-kmz"
      }
    ],
    "ProcessDefinition": "[{\\\"id\\\":\\\"TICKET_START\\\",\\\"name\\\":\\\"开始\\\",\\\"nodeIndex\\\":0,\\\"properties\\\":{\\\"position\\\":{\\\"x\\\":250,\\\"y\\\":200}},\\\"type\\\":\\\"TICKET_START\\\",\\\"events\\\":[{\\\"edgeId\\\":\\\"8bd07339\\\",\\\"sourceAnchor\\\":0,\\\"next\\\":\\\"APPROVAL__JNBSSREc\\\",\\\"targetAnchor\\\":0}]},{\\\"id\\\":\\\"TICKET_FINISH\\\",\\\"name\\\":\\\"结束\\\",\\\"nodeIndex\\\":9999,\\\"properties\\\":{\\\"position\\\":{\\\"x\\\":767,\\\"y\\\":206}},\\\"type\\\":\\\"TICKET_FINISH\\\",\\\"events\\\":[]},{\\\"id\\\":\\\"APPROVAL__JNBSSREc\\\",\\\"name\\\":\\\"流程节点\\\",\\\"nodeIndex\\\":1,\\\"properties\\\":{\\\"skillGroupId\\\":\\\"chat001@cccV2-kmz\\\",\\\"position\\\":{\\\"x\\\":537,\\\"y\\\":164.5}},\\\"type\\\":\\\"APPROVAL\\\",\\\"events\\\":[{\\\"edgeId\\\":\\\"74031613\\\",\\\"sourceAnchor\\\":1,\\\"next\\\":\\\"TICKET_FINISH\\\",\\\"targetAnchor\\\":0}]}]",
    "UpdatedTime": 1717664210000
  },
  "RequestId": "BF268B34-09C2-43FD-BAC4-5D31EA633111",
  "HttpStatusCode": 200,
  "Code": "OK",
  "Message": "无",
  "Params": [
    "无"
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

404 NotExists.InstanceId The specified instance %s does not exist. The specified call center instance does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.