Adds a structured element to an AISearch project. Supported element types include miniapp and product.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/aiSearch/resource/add HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| type |
string |
Yes |
The type of the structured element. Valid values:
|
miniapp |
| data |
any |
No |
The information about the structured element that corresponds to the |
{ "miniapp_id": "test_miniapp", "title": "testApp", "version": "1.0.5", "description": "description-mock", "slogan": "slogan-mock", "icon": "https://img.alicdn.com/test_icon.png", "detail_desc": "detail-mock" } |
The type parameter is an enumeration. Only the specified values are supported. If you specify an unsupported value, the API call fails. Additional structured content types will be supported in future releases.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
4A0AEC56-5C9A-5D47-93DF-7227836FFF82 |
| data |
object |
The data returned. |
|
| type |
string |
The type of the structured element. The value of this parameter is the same as the type parameter in the request. Valid values:
|
miniapp |
| resourceId |
string |
The ID of the structured element resource. This ID is the unique and immutable identifier of the resource in the database. Use this ID for subsequent modification, deletion, and query operations. |
WzMGQZwB7nQEs3Qk3ajH |
Examples
Success response
JSON format
{
"requestId": "4A0AEC56-5C9A-5D47-93DF-7227836FFF82",
"data": {
"type": "miniapp",
"resourceId": "WzMGQZwB7nQEs3Qk3ajH"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.