External activity publishing api and tests