Getting information about a particular task_id - api

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.

Related

How to get data from a specific ID from The Guardian API?

I want to get data from a specific id from The Guardian API.
The documentation states that you just have to fetch this:
https://content.guardianapis.com/business/2014/feb/18/uk-inflation-falls-below-bank-england-target
You also have to include your API key, but when I try to fetch it, I always get only the status and some basic information and not the actual data.
response screenshot
I even added
show-fields=body
and
show-section=true&show-blocks=all
But nothing seems to work, any help would be appreciated.
Documentation: https://open-platform.theguardian.com/documentation/item

Access existing Correlation ID

When returning Problem result ASP.NET generates standartized responce model that includes "traceId": "00-d98512464f3f5a4b9ac3b8e02a03ecd0-8720663d0b55c94a-00". That traceId is actually Correlation id since it includes Span Id and other stuff.
That's great for error responses, but I also want to get that value for valid ones. Possible solution for this is to add it to response headers.
Issue is I have no idea, how to get it (except calling Problem().Value and getting it from there).
Look at System.Diagnostics.Activity.Current (docs)
It has the properties SpanId, TraceId and Id. Id returns the same value as Problem result (00-d98512464f3f5a4b9ac3b8e02a03ecd0-8720663d0b55c94a-00 in your case).

How to filter with "_links" properties params on API.v3 in openproject

I just learned to use "hypermedia rest API" on openproject
I want to use "filter" param with "_links" properties on API but not know-how
Example:
http:/<my_domain>/target/api/v3/projects/design/work_packages?filters=[{"updatedAt":{"operator":"<>d","values":["2017-06-10T22:00:00Z","2017-07-05T22:00:00Z"]}, "_links":{"type":{"title":{"operator":"=","values":["Box"]}}}]
==> My Question:
i not known use to "_links":{"type":{"title":{"operator":"=","values":["Box"]} params filter. Now, result is not filter for "_links"
And show me books name to learn API for to beginner
? (https://www.oreilly.com/library/view/restful-web-clients/9781491921890/ch04.html#callout_hal_clients_CO1-1) -> is this ok?
Help me, please!
Thanks!
Image for my api
What I understood you wanting to achieve is getting all work packages in the project "design" that have been updated last within a certain time interval and that are of the type "Box".
The filters in OpenProject do not differentiate between native properties (like updatedAt) and linked resources (like type) when it comes to the structure of the filters. The syntax is always
{"<name of the filter>": {"operator": "<operator>": "values": [<list of values>]}}
When it comes to the filter values however, there is a difference. For linked resource the client is expected to use the id whereas native value like an integer, string or date is required for the native properties.
For your request the above requires the client to issue the following query:
GET http://domain/target/api/v3/projects/design/work_packages?filters=[{"updatedAt":{"operator":"<>d","values":["2017-06-10T22:00:00Z","2017-07-05T22:00:00Z"]}}, {"type":{"operator":"=", "values":["10"]}}]
I took the id of 10 for the type "Box" out of the screenshot you provided.
To get the filter values of all available filter you can call
POST http://domain/target/api/v3/queries/form
with a body of
{"name":"default","_links":{"project":{"href":"/api/v3/projects/design"}}}
The response will list all available filters in the _embedded/schema/_embedded/filtersSchema array.

"Unprocessable entity" when trying to change the fulfilment status of an order IN SHOPIFY

I m trying to change the fulfilment status of an order , this is the json
data sent :
{"fulfillment":{"tracking_number":null,"line_items":[{"id":"XXXXXXX"}]}} and this is the url "/admin/orders/XXXXXXXXX/fulfillments.json"
but i get this error "Unprocessable entity" .
looking for your help .
thanks
Alaeddine
What was the body of the response?
"Unprocessable entity" is a 422 HTTP response, which is generally used for validation errors. Validation errors will generally have a description of the error in the body of the response which might help debug the problem.
Edit: As David Underwood mentioned:
The ID you need to provide is for the line item, not the variant. When you fetch the order you'll see the ids of the line items in the response. Those are the ones you need when creating the fulfillment.
This usually happens if the order and/or line item has already been fulfilled. Another common issue is not setting the accept and content type headers for your request.
If that isn't the case and the other suggestions done help could you post the order I'd so we can look into what is happening in your specific case?

Flattr API gives File Not found Error

I try the following example: https://api.flattr.com/rest/v2/things?id=38589
The ID Exist but I get a File Not found Error.
Something wrong in the API? I know it worked a couple of days ago.
The correct URL to thing with id 38589 is https://api.flattr.com/rest/v2/things/38589
And to get multiple things you separate them with a comma:
https://api.flattr.com/rest/v2/things/38589,123
I spotted a error in the documentation concerning fetching multiple things and will update it at once.