microappchild
description
The MicroAppChild API provides endpoints for managing child items (such as files and images) that are associated with MicroApp data entries (see microappdata). These endpoints are used to handle file attachments, images, and other child resources that belong to a parent MicroApp data entry.
Child items are always associated with a specific field (identified by fieldID
) in a parent MicroApp row (identified by appID
). The parent row must be created first using the MicroApp data endpoints before child items can be attached to it.
parameters
The X-Auth-Token
and X-User-Id
are derived from the values authToken
and userId
returned from the login endpoint and are used in the HTTP header.
List Child Items
Endpoint
POST /api/microappchild/list
Headers
x-user-id
: User ID for authenticationx-auth-token
: Authentication tokenContent-Type
: application/json
Query Parameters
appID
(required): Parent app item IDfieldID
(required): Parent field IDoptUserToken
(optional): User authentication token
Response
Returns an array of child items matching the query parameters.
Example Request
curl -X POST \
'https://your-buzzy-instance/api/microappchild/list?appID=123&fieldID=456' \
-H 'x-user-id: your-user-id' \
-H 'x-auth-token: your-auth-token'
Create Child Item
Endpoint
POST /api/microappchild/create
Headers
x-user-id
: User ID for authenticationx-auth-token
: Authentication tokenContent-Type
: application/json
Request Body
{
"microAppResourceID": "string", // ID of the MicroApp resource
"appID": "string", // ID of the parent app item
"fieldID": "string", // ID of the parent field
"content": { // Content data for the child
"url": "string", // Optional: URL for file/image content
"filename": "string", // Optional: Filename for file content
"size": "number", // Optional: File size
"type": "string", // Optional: File type
"expiredAt": "number" // Optional: Expiration timestamp
}
}
Response
Returns the ID of the newly created child item.
Update Child Item
Endpoint
POST /api/microappchild/update
Headers
x-user-id
: User ID for authenticationx-auth-token
: Authentication tokenContent-Type
: application/json
Request Body
{
"childID": "string", // ID of the child to update
"content": { // New content data
// Content fields to update
}
}
Response
Returns success status of the update operation.
Delete Child Item
Endpoint
POST /api/microappchild/delete
Headers
x-user-id
: User ID for authenticationx-auth-token
: Authentication tokenContent-Type
: application/json
Request Body
{
"childID": "string" // ID of the child to delete
}
Response
Returns success status of the deletion operation.
Last updated