Question: **Rest API - SOQL Query :** 
When I Query i am able to get all user's record instead of mine only. Is there any way to filter for get records of current user only.

Answer: 
While doing authentication with salesforce, will return response as per bellow :

```
{"id":"https://login.salesforce.com/id/00D28000000HpKw***/00528000000HsA7***","issued_at":"1429777622492","scope":"api","instance_url":"https://ap2.salesforce.com","token_type":"Bearer","signature":"HHORb4H9yZ6+fjYtn6OLBbeRvof9n4TuaXpYVh2qgck=","access_token":"00D28000000HpKw!AQcAQA8emoHQ8upI19zT_Yr4ctNAyE5lxc8yv6uFZbnszyNJOiF1ONC1ZsTcvoOtFduxxSEEquJdAoyq2E1Sn5mugFWqqUrJ"}

```

Response contains "Userid" at the end of "id" string (starts with 005).

Userid : "00528000000HsA7\*\*\*"
Use that UserID in filter as per bellow :

```
/services/data/v29.0/query?q=SELECT+Name+from+Opportunity+where+OwnerId=+'00528000000HsA7***'

```
If you want the user record then for standard fields no soql query required.
you can directly use UserInfo class and its appropriate methods.

UserInfo Methods: <http://www.salesforce.com/us/developer/docs/dbcom_apex230/Content/apex_methods_system_userinfo.htm>

If you want other object records which are created by current user then try this:

Id currentUserId = UserInfo.getUserId();

List oppList = [SELECT Id, IsPrivate, Name, OwnerId, CreatedDate, CreatedById, LeadSource, Type FROM Opportunity where createdById=:currentUserId ];