Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In bot details API, add icon image URL parameter #56

Closed
karntrehan opened this issue Apr 6, 2023 · 10 comments · Fixed by #70
Closed

In bot details API, add icon image URL parameter #56

karntrehan opened this issue Apr 6, 2023 · 10 comments · Fixed by #70
Assignees

Comments

@karntrehan
Copy link
Contributor

karntrehan commented Apr 6, 2023

In bot details API we need icon image url. Currently we have hardcoded the icon image url from local.

@karntrehan
Copy link
Contributor Author

@geeky-abhishek to share current API being called.

@geeky-abhishek
Copy link
Contributor

@manojSRawat
Copy link

@chinmoy12c Bot create CURL:

curl 'http://143.110.183.73:3002/admin/bot' \
  -H 'asset: bot' \
  -H 'admin-token: token' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'ownerOrgID: org01' \
  -H 'Referer: http://localhost:3008/' \
  -H 'ownerID: ownderId' \
  --data-raw '{"data":{"name":"Bot 1","description":"Bot 1","purpose":"Bot 1","startingMessage":"Bot 1","startDate":"2023-04-14","endDate":null,"isBroadcastBotEnabled":true,"segmentId":"1","status":"enabled","users":[],"logic":["53e4043f-eef1-4d90-aa67-f49279baf22b"]}}' \
  --compressed \
  --insecure

@chinmoy12c
Copy link
Member

@karntrehan should the bot icons be stored on minio?

@karntrehan
Copy link
Contributor Author

Yes. Bot Icons and Form images can all for now be stored in minio.

@chinmoy12c
Copy link
Member

chinmoy12c commented Apr 25, 2023

We need to add a new column to Bot on Hasura to store the image filename.

@ChakshuGautam @pankajjangid05

@susheelvar
Copy link

@chinmoy12c to complete unit tests today and raise PR.

@chinmoy12c
Copy link
Member

chinmoy12c commented May 5, 2023

PR has been raised. The endpoint now has changed as follows:


curl --location 'http://[UCI_API_HOST]/admin/bot' \
--header 'admin-token: [ADMIN_TOKEN]' \
--form 'botImage=@"/home/chinmoy/Downloads/bot_circle.png"' \
--form 'data="{
    \"data\": {
        \"startingMessage\": \"Namaste Bot Icon\",
        \"name\": \"BotIconTest\",
        \"users\": [],
        \"logic\": [],
        \"status\": \"enabled\",
        \"startDate\": \"2023-05-4\",
        \"endDate\": \"2025-12-01\"
    }
}"'


@karntrehan
Copy link
Contributor Author

@geeky-abhishek to check

@geeky-abhishek
Copy link
Contributor

@karntrehan @susheelvar @chinmoy12c getting error code 500 for the above curl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants