AISearchResourceAdd
Adds a structured element to an AISearch project. The supported structured element types are mini program (miniapp) and product (product).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
energy:AISearchResourceAdd |
none |
*All Resource
|
None | None |
Request syntax
POST /api/v1/aiSearch/resource/add HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| type |
string |
Yes |
The type of the structured element. Valid values:
|
miniapp |
| data |
any |
No |
The structured element information corresponding to the type. You must pass parameters for this field in JSON format according to the specified format. |
{ "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 field is essentially an enumeration type and only supports specified values. Values outside the specified range cause the API to fail. More structured content types will be added based on future requirements.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
4A0AEC56-5C9A-5D47-93DF-7227836FFF82 |
| data |
object |
The returned data. |
|
| type |
string |
The type of the structured element. The value is the same as the type field in the request parameters. Valid values:
|
miniapp |
| resourceId |
string |
The resource ID of the structured element. This is a unique and immutable identifier for the resource in the database, and is used for subsequent update, delete, 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.