get and post api for pins (bug 957677)