All Products
Search
Document Center

Data Management:CreateOrder

Last Updated:Nov 28, 2024

Creates a ticket.

Operation description

To facilitate ticket creation, you can call the following dedicated operations to create some types of tickets:

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dms:CreateOrdercreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

3***
CommentstringYes

The description of the ticket to be created.

test
PluginParamobjectYes

The ticket creation parameter. The value is a JSON string. The value of this parameter differs based on the type of the ticket. For more information, see the PluginParam parameter section in this topic.

{PluginParam_test}
RelatedUserListstringYes

The IDs of the stakeholders that are involved in the ticket. Separate multiple IDs with commas (,).

user1,user2
PluginTypestringYes

The type of the ticket. For more information, see PluginType parameter.

DATA_EXPORT
AttachmentKeystringNo

The key of an attachment that is returned after the attachment is uploaded. You can call the GetUserUploadFileJob operation to query the key of the attachment.

test_AttachmentKey

PluginParam parameter


# Change a schema design.
 {
    "title": "test", // The name of the ticket.
    "description": "test", // The description of the ticket.
    "dbId": 11****, // The database to which changes are made.
    "logic": false, // Specifies whether the database is a logical database.
    "relatedIds": [], // The IDs of the stakeholders that are involved in the ticket.
  }

# Export data.
 {
  "classify": "Reason", // The purpose of the ticket.
  "dbId": 17****, // The ID of the database from which data is exported.
  "exeSQL": "select 1", // The SQL statement that is executed to export data.
  "logic": false, // Specifies whether the database is a logical database.
  "ignoreAffectRows": false, // Specifies whether to ignore the affected rows.
  "affectRows": 1, // The estimated number of affected rows.
  "ignoreAffectRowsReason": "" // The reason for ignoring the affected rows.
 }

If you need to create more types of tickets, submit a ticket for consultation. 

Response parameters

ParameterTypeDescriptionExample
object
CreateOrderResultarray

The ID of the ticket.

OrderIdslong
12***
RequestIdstring

The ID of the request.

427688B8-ADFB-4C4E-9D45-EF5C1FD6****
ErrorCodestring

The error code.

UnknownError
ErrorMessagestring

The error message.

UnknownError
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true

Examples

Sample success responses

JSONformat

{
  "CreateOrderResult": {
    "OrderIds": [
      0
    ]
  },
  "RequestId": "427688B8-ADFB-4C4E-9D45-EF5C1FD6****",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history