[Bug] CustomAPI with Docker Service Discovery doesn't work
arhue opened this issue · 8 comments
Description
Specifying customAPI with Docker Service Discovery doesn't work. I am specifically using Docker in Swarm mode. Not confirmed if the same does/does not work in standalone mode.
Related discussion here: #2574
Steps to reproduce
- Add labels for widget with Custom API
Eg.
labels:
- homepage.group=Downloaders
- homepage.name=Kapowarr
- homepage.href=http://kapowarr.loc.com
- homepage.description=Comics management
- homepage.widget.type=customapi
- homepage.widget.url=http://kapowarr.loc.com/api/volumes/stats?api_key=$KAPOWARR_API_KEY
- homepage.widget.field[0].label=Series
- homepage.widget.field[0].field.result=volumes
- The customAPI widget doesn't show up.
homepage version
v0.8.4 32f28d3
Installation method
Docker
Configuration
labels:
- homepage.group=Downloaders
- homepage.name=Kapowarr
- homepage.href=http://kapowarr.loc.com
- homepage.description=Comics management
- homepage.widget.type=customapi
- homepage.widget.url=http://kapowarr.loc.com/api/volumes/stats?api_key=$KAPOWARR_API_KEY
- homepage.widget.field[0].label=Series
- homepage.widget.field[0].field.result=volumes
Container Logs
No response
Browser Logs
No response
Troubleshooting
Nothing relevant in logs
Other
No response
Before submitting, I have made sure to
- Check the documentation
- Follow the troubleshooting guide (please include output above if applicable).
- Search existing issues and discussions.
Specifying customAPI with Docker Service Discovery doesn't work
I dont think thats accurate
- homepage.widget.type=customapi
- homepage.widget.url=https://rickandmortyapi.com/api/character/1
- homepage.widget.mappings[0].field=name
- homepage.widget.mappings[0].label=Name
- homepage.widget.mappings[1].field.location=name
- homepage.widget.mappings[1].label=Location
@shamoon That did not work for me either. Are you using it in Swarm mode or in standalone mode? There are other people in the discussion who have reported the same issue.
Might just be a documentation issue, you're using mappings[] in your label, but the docs say field[].
@aeikenberry Did mappings[] work for you? It did not work for me in Swarm mode.
@arhue Yeah, the block shows up for me with the correct label using that format.
- homepage.widget.type=customapi
- homepage.widget.url=http://kapowarr.loc.com/api/volumes/stats?api_key=$KAPOWARR_API_KEY
- homepage.widget.mappings[0].field.result=volumes
- homepage.widget.mappings[0].label=Volumes
- homepage.widget.mappings[1].field.result=issues
- homepage.widget.mappings[1].label=Issues
- homepage.widget.mappings[2].field.result=files
- homepage.widget.mappings[2].label=Files
Works for me, thanks!
EDIT: Looks like the docs are updated, thanks!
Nvm, got it to work with mappings as well. Thanks everyone, sorry about the confusion.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.