Get asana tasks in project with assignee information - api

I am trying to retrieve asana tasks within a project. I would like to retrieve assignee information in the same query. I tried this query and got assignee id:
curl -u <key>: "https://app.asana.com/api/1.0/projects/<project-id>/tasks?opt_fields=name,created_at,assignee
I want get assignee name. So I include "opt_expand=assignee":
curl -u <key>: "https://app.asana.com/api/1.0/projects/<project-id>/tasks?opt_fields=name,created_at,assignee&opt_expand=assignee
I still don't get assignee name. What's the way to do this?
Thanks

(I work at Asana)
The interplay between opt_fields and opt_expand is actually a bit complicated, we should clarify in the documentation. The latter ends up superseded by - not additive with - the former.
The best way to achieve what you want would be to NOT use opt_expand and to add assignee.name to the list of fields in opt_fields.

Related

JQl - how to find linked issues in an issue

Iam looking for the Jira JQL syntax, to find the linked-issues in an Issue. For example in Bug-issue i need to have in my report the linked-issues to my Bug-issue!
Thanks
If I understand your question well, you are looking for a JQL that will fetch you all the bugs that are LINKED to that specific bug!!! Considering this is what you're asking, here is the solution for that:
You'll need to create a filter as like what is shown below, and name this filter as MyFilter:
issuetype = Bug AND issuekey = ABC-12345
Then you will have to use this filter in the next filter to get all the linked issues (bugs) to the current bug:
issuetype in (Bug) and issueFunction in linkedIssuesOf('filter = MyFilter')
Using the second filter, you should be getting all the linked bugs to the original bug.
Hope this helps!

delete property of event keen.io

Is there a way to delete a property of an event?
e.g. I have an event called Log which has a two properties X and Y
I wanted to delete X
If this cannot be done can I edit the values of X for event Log?
I have been unable to find anything online
Take a look here at the API Docs. Have you tried sending a DELETE to https://api.keen.io/3.0/projects/PROJECT_ID/events/Log/properties/X or something along those lines? This will delete the property from all events in the collection.
You can delete just a certain property or particular properties from your Event Collection as shown here: https://keen.io/docs/api/#delete-a-property.
While in some cases you may want to delete erroneous or errant data, in other cases especially where you are not actively using and querying the data it is OK to leave the property there. It will appear in your historical data, but just don't continue to send the property in for future data points. There is a generous limit on the number of unique properties (1,000 unique properties) allowed per event as well as a large size limit on individual events as well (~1MB).
I’d recommend running an extraction of the exact same query first (https://keen.io/docs/api/#extractions) to get a preview of what you’re about to delete. That way you’ll also have successfully created a backup of that data as well.
Here's a sample CURL command for deletes for a particular property - use COLLECTION_NAME and PROPERTY_NAME to identify the property that you want to remove from your particular event collection. Of course, replace PROJECT_ID, COLLECTION_NAME, and MASTER_KEY placeholders with your own.
$ curl https://api.keen.io/3.0/projects/PROJECT_ID/events/COLLECTION_NAME/properties/PROPERTY_NAME \
-H "Authorization: MASTER_KEY" \
-H "Content-Type: application/json" \
-X DELETE

Getting information about a particular task_id

I want to get the information like "created_at" , "completed" for a particular task id in asana. I used the following :
https://app.asana.com/api/1.0/tasks/task_id but it is giving the error message : "assignee: Missing input" .
I also used https://app.asana.com/api/1.0/projects/project_id/tasks?opt_fields=name,created_at,completed to get tasks related to a particular project but I want
the information about a specific task.
So is there any way to do it.
Any help is much appreciated.
Thanks
I'm guessing you're making a POST or PUT request. You should be making a GET request if you want to retrieve information.

Rally request user story

We are using Rally Agile tool and Im trying to request all User Strories expecting to get list like:
S12
S13
S53
etc.
when I use [rally-server-address]/slm/webservice/v2.0/hierarchicalrequirement.js I receive list of:
US12
US43
etc.
Maybe I do not understand how to query User Stories clearly... Any help are really appreciated.
Could you elaborate on what is the problem with US12 US43 etc ? Is it the order? If you want the user stories to be ordered by FormattedID, you may specify it using order parameter, &order=FormattedID:
https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1111&query=&start=1&pagesize=200&&fetch=FormattedID,ScheduleState&order=FormattedID
If you want your user stories prefix to be 'S' instead of 'US', Work Product Prefixes can be changed on a workspace level in Setup. Workspace administrator rights are necessary.
Also, when using v2.0 there is no need to have .js in the query.

Disqus API: get total forum number of comments/posts

I'm trying to get the total number of comments that have been written in a given forum.
Looking at http://disqus.com/api/docs/ I can't see anything like this. Honestly, it sounds weird.
Forum details ( http://disqus.com/api/docs/forums/details/ ) shows anything but.
Any hack/piece of code/hidden API call that would to the trick?
Thanks in advance
The best way I have found is to get the list of all the threads and then sum the number of posts for each one:
curl -0 -L "https://disqus.com/api/3.0/forums/listThreads.json?api_key=YOUR_API_KEY&forum=YOUR_FORUM_NAME&limit=100"
Dont forget to iterate over different pages of results if you get a 'next' cursor (response['cursor']['next']).
See this gist for a full JavaScript example (intended to run on Google Script):
https://gist.github.com/sarfata/5068200