In Keycloak I see there is a CRUD API to create a resource (and scopes):
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set