Adding REST API and internal API methods for PublicKey resource

@mpdavis