Follow

masto admin, boost ok 

is there any way to get the list of block domain by my own instance via the API?

I've looked there, but nothing seems to be there:
docs.joinmastodon.org/methods/

re: masto admin, boost ok 

@kyzh nope, there is not

i wanted to make that (optionally) appear in the nodeinfo endpoint (because pleroma already does that), but i did not manage to convince gargron

re: masto admin, boost ok 

@Thib almost like there is a pattern here 🤔

Thank you for the answer tho, I can stop duck ducking now

re: masto admin, boost ok 

@kyzh

Unfortunately, the list of instance blocks and allows are not exposed over the API. If you'd like, I could write a patch allowing you to add this feature to your server.

re: masto admin, boost ok 

@firedemon that would be awesome.
I am not sure how much work that would be tho, so I wouldnt want you to spend a lot of time on this, at least not for free.

I also wonder if the hometown fork would take it onboard.
That would make the change a lot more easier to manage over time.

re: masto admin, boost ok 

@kyzh

I've added a few options:

This commit will add domain allows and blocks to /nodeinfo/2.0.json and /api/v1/instance if the "show blocks to" option in your Site Settings isn't set to "To no one".

This commit adds API endpoints for /api/v1/admin/domain_allows and /api/v1/admin/domain_blocks, along with the respective OAuth2 scopes admin:read:domain_allows and admin:read:domain_blocks.

re: masto admin, boost ok 

@firedemon thank you very much for that !
This is very much appreciated.

Would you like me to send any money your way ?

re: masto admin, boost ok 

@kyzh

Yes, and we encourage forks to adopt and adapt our patches.

masto admin, boost ok 

@charlag to automate the dispersion of knowledge :)

masto admin, boost ok 

@kyzh hm, maybe it shouldn't be in Mastodon API then but somewhere in nodeinfo?

Sign in to participate in the conversation
Rage.love

Generalist Hometown instance with a strong focus on community standards. No TERF, no SWERF, no Nazi, no Centrist.