I'm getting an error when trying to reference different object codes using the workfront API. When I try to do a https://company.attasksandbox.com/attask/api/arvpth/search
I get the following response:
{"error":{"class":"java.lang.IllegalArgumentException","message":"Unknown object type: arvpth in v2.0"}}
I know the object code exists because it's in the API Explorer. The only thing that's got me confused is that the error displays v2.0, if this means it's trying to use the API versioin 2.0 then, yes the object code did not exist in that version. So does anyone have an idea on why is it trying to use v2.0 instead of the current v4.0 of the API?
Thanks!
In order to use v4 of the API, you have to append api/v4.0/ to your link, ie, https://company.attasksandbox.com/attask/api/v4.0/arvpth/search
At least, that is what I had to do in my version of the environment. Hope this helps.
Related
I have an active IBM Softlayer account. I am getting the error as
{"error":"One of types passed is not in the proper container.",
"code":"SoftLayer_Exception_Metric_Tracking_Object_InvalidDataType"}
when trying to fetch the cpu metric image using the below rest API with valid Virtual_Guest_Id and Snapshot_Range":
"api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/<Virtual_Guest_Id>/getCpuMetricImage/<Snapshot_Range>"
But I am getting the proper response while fetching the memory metric image using the similar rest API listed below:
"api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/<Virtual_Guest_Id>/getMemoryMetricImage/<Snapshot_Range>"
First of all your REST request is wrong it should something like this:
POST https://$USERNAME:$APIKEY#api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/$VSIID/getCpuMetricImage
PAYLOAD:
{
"parameters": ["day","9/2/2017"]
}
Second the method is not working currently I am going to report it, but I do not have idea when they are going to fix it.
Another thing to point out is that the Softlayer's control portal do not use that method to display the graph, so is likely that the image returned by the method and the graph in the portal are going to be different. If you want the same inforamtion I recomend you to use the same method see this forum for more information:
SoftLayer API CPU usage mismatch
The method in the forum above will return you the data of the graph and then you are going to need to represent that information in a graph using your own code.
Regards
Hello i'm trying to get some event information using the facebook graph api v2.5 but I keep getting the error message facebook.GraphAPIError: Unknown path components: /144259682284406. It works without the fields when I don't specify v2.5 however I need to use v2.5 to get the necessary fields
/v2.5/144259682284406?fields=events{name,id,timezone,start_time,end_time,picture,description,category,type,attending_count,interested_count,declined_count}
Blockquote
The exact same request worked in Graph API Explorer or when calling the API via URL directly – so it must have been something in how you pass the parameter in your SDK code.
Checking http://facebook-sdk.readthedocs.org/en/latest/api.html it turns out, that the API version has to be passed when the facebook.GraphAPI object instance is created,
graph = facebook.GraphAPI(access_token='your_token', version='2.2')
That way the SDK will take care of putting that version string into the URLs that the API requests are made to by itself, so that you don’t have to take care of that any more in the following code where you make the API calls.
Try this ;)
The id 144259682284406 you are using is a page object and if you want to get page events you should query like this:
page/events/?fields=field1,field2,... in your case:
/v2.5/144259682284406/events/?fields=name,id,timezone,start_time,end_time,picture,description,category,type,attending_count,interested_count,declined_count
I tried to get Data from Facebook Page with the graph of Facebook but I have a problem.
When I try to go on link like:
https://graph.facebook.com/ID-PAGE?access_token=MY_ACCESS_TOKEN
I always do this to have the Data from a Page but since today I have the error Message: "An unknown error has occurred".
Thanks for help.
EDIT:
The bug is fixed : https://developers.facebook.com/bugs/486654544831076/?search_id
Have a look at my answer at
How to get user email and birthday from Facebook API Version v2.4
You have to specify each field you want to query now with v2.4. If you want to explicitly use v2.3, you need to prepend your calls by /v2.3 like this:
/v2.3/{page_id}?access_token=MY_ACCESS_TOKEN
Seems like there's currently a bug regarding requests made with app access tokens instead of user access tokens:
https://developers.facebook.com/bugs/486654544831076/
At this moment, I pretty much figured out what is happening, and it looks like a bug in the Facebook API.
For v2.3 and lower:
The /PAGE-ID call will return an Unknown server error when you don't pass ?fields=username (for example). If you do pass the fields option, it will work. You can get it out of the docs.
For v2.4:
This will work, but you will miss a lot of data, so you'll also have to pass the fields options. But if you don't pass that, this version will give you back only the most basic of details. This is as described in the version release: https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/
So the solution for now, would be to add the ?fields= everywhere you need, or to wait for Facebook to maybe ever solve it.
(And while you're at it, you might as well upgrade to v2.4 ;-)
Is it even possible to create a page using the Prototype REST API?
I know how to do this using the REST API (available with Confluence 5.5 and up), but I'm not sure how to do this on older versions.
For new api, I do it like that: {url}/rest/api/content and provide parameters like type, space, title and ancestors.
For the Prototype API I've tried to do:
{url}/rest/prototype/latest/content.json and provide the same parameters, but I get "Request failed: method not allowed (405)" in response.
Turns out, the prototype REST API is read-only.
Is there a way to get all status types from the JIRA webservice, either through the api or through a JQL request? (The issue status is the field that is mapped to the swimlanes when the board is set up)
Whith JIRA REST API you can :
rest/api/2/status
or for each project :
rest/api/2/project/{projectIdOrKey}/statuses
see the online rest api browser : it's a wonderful tool :
https://jira.atlassian.com/plugins/servlet/restbrowser#/resource/api-2-status
For future reference, to see what's in a project's swimlanes for a JIRA agile board you make a request like this: https://jira.atlassian.com/rest/greenhopper/1.0/xboard/work/allData.json?rapidViewId=560 and it will return the relevant information.
Each board has a rapidViewId so you'll have to query for that yourself using a request like this: /rest/greenhopper/1.0/rapidview.
All this stuff can be found here: https://jira.atlassian.com/plugins/servlet/restbrowser#/resource/greenhopper-1-0-rapidview
This is for future reference so that people don't have to go through the same trouble I did when trying to figure this out. Hope it helps!