Post

3 followers Follow
0
Avatar

API V2 Get logged in user's projects

I have application and I want to show only logined user projects(only this user not all project list).
I am using this API https://api2.clarizen.com/V2.0/services/data/query
And here is my query(SELECT name,Manager,Manager.name FROM Project WHERE createdOn>2018-04-03)
But I am getting all project list.
please help me.

Best Regards Hakob

Hkhurshudyan Answered

Official comment

Avatar

Hi Hakob,

Sorry for the late response.

Please let me know if I get your question right. You want all projects for that are managed by a specific user or all projects that were created after a specific date?

 

 

Elad Franklin
Comment actions Permalink

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Elad, I would also like to know how best to accomplish this. I have not found any examples and am looking to find the most efficient way to get a list of projects where the user has a role.

 

Thanks

toby

Toby Pilling 0 votes
Comment actions Permalink
0
Avatar

Hi Toby,

Please try this:

End point: /data/Query
{
"q": "select ExternalID,ResourceRole,WorkItem.Name FROM ResourceLink WHERE Resource = '/User/3moc5ygug4uno66lfvgky8xr91977'"
}

Response:

{
"entities": [
{
"id": "/RegularResourceLink/6bdfpdn6zxm87jh20ja8e2444",
"ExternalID": "6bdfpdn6zxm87sju20ja8e2444",
"ResourceRole": {
"id": "/ResourceRole/Resource"
},
"WorkItem": {
"id": "/Project/6bdfpdn6zh20ja8e2442",
"Name": "Tenderson Master Project"
}
},
{
"id": "/OwnerLink/6bdfpd87sjutjh20ja8e2449",
"ExternalID": "6bdfpdn6zxjh20ja8e2449",
"ResourceRole": {
"id": "/ResourceRole/Manager"
},
"WorkItem": {
"id": "/Project/6bdfpdn6zxtjh20ja8e2442",
"Name": "Tenderson Master Project"
}
},
{
"id": "/RegularResourceLink/13ylt9z8tpc0d5yt7kbg95237",
"ExternalID": "13ylt9z8o31vtpyt7kbg95237",
"ResourceRole": {
"id": "/ResourceRole/Resource"
},
"WorkItem": {
"id": "/Project/6bdfpdn6zxtjh20ja8e2470",
"Name": "Tenderson Customer Support Project"
}
}
],
"paging": {
"from": 100,
"limit": 100,
"hasMore": true
}
}

 

I hope this helps,

Elad

 

 

Elad Franklin 0 votes
Comment actions Permalink