Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @swagger
- * /api/assets:
- * post:
- * tags:
- * - Assets
- * description: Create a new asset with possible attachments and bot kit details.
- * consumes:
- * - multipart/form-data
- * produces:
- * - application/json
- * parameters:
- * - in: formData
- * name: name
- * type: string
- * description: Name of the asset.
- * required: true
- * - in: formData
- * name: content
- * type: string
- * description: Content related to the asset.
- * - in: formData
- * name: productId
- * type: integer
- * description: ID of the associated product.
- * - in: formData
- * name: collectionId
- * type: integer
- * description: ID of the associated collection.
- * - in: formData
- * name: category
- * type: string
- * description: Category of the asset.
- * - in: formData
- * name: bot[logo]
- * type: file
- * description: Bot logo (only PNG, JPG formats are accepted). Max count: 1.
- * - in: formData
- * name: bot[name]
- * type: string
- * description: Name of the bot.
- * - in: formData
- * name: bot[description]
- * type: string
- * description: Description of the bot.
- * - in: formData
- * name: bot[roles]
- * type: string
- * description: Roles of the bot.
- * - in: formData
- * name: bot[bot_tone]
- * type: string
- * description: Tone of the bot.
- * - in: formData
- * name: bot[brand_tone]
- * type: string
- * description: Brand tone of the bot.
- * - in: formData
- * name: bot[response_length]
- * type: integer
- * description: Response length of the bot.
- * - in: formData
- * name: bot[multilang_enabled]
- * type: boolean
- * description: Whether multilanguage is enabled for the bot.
- * - in: formData
- * name: bot[language]
- * type: string
- * description: Language of the bot.
- * - in: formData
- * name: bot[imported_data]
- * type: string
- * description: Imported data for the bot.
- * - in: formData
- * name: bot[include_citations]
- * type: boolean
- * description: Whether to include citations for the bot.
- * - in: formData
- * name: attachments
- * type: file
- * description: File(s) to upload as attachments (only PNG, JPG formats are accepted).
- * responses:
- * 201:
- * description: Asset created successfully
- * content:
- * application/json:
- * schema:
- * type: object
- * properties:
- * success:
- * type: boolean
- * data:
- * type: object
- * properties:
- * id:
- * type: integer
- * name:
- * type: string
- * content:
- * type: string
- * productId:
- * type: integer
- * collectionId:
- * type: integer
- * category:
- * type: string
- * activeHistoryId:
- * type: integer
- * bot:
- * type: object
- * properties:
- * name:
- * type: string
- * description:
- * type: string
- * roles:
- * type: string
- * bot_tone:
- * type: string
- * brand_tone:
- * type: string
- * response_length:
- * type: integer
- * multilang_enabled:
- * type: boolean
- * language:
- * type: string
- * imported_data:
- * type: string
- * include_citations:
- * type: boolean
- * logo:
- * type: string
- * attachments:
- * type: array
- * items:
- * type: object
- * properties:
- * id:
- * type: integer
- * filename:
- * type: string
- * path:
- * type: string
- * mimetype:
- * type: string
- * 400:
- * description: Validation error
- * content:
- * application/json:
- * schema:
- * type: object
- * properties:
- * success:
- * type: boolean
- * message:
- * type: string
- * 500:
- * description: Error creating asset
- * content:
- * application/json:
- * schema:
- * type: object
- * properties:
- * message:
- * type: string
- * success:
- * type: boolean
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement