Confluence Prototype REST API - create a page? - confluence

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.

Related

How to: Get Report Definition using SSRS RESTful API?

I have been working with the RESTful SSRS endpoint documentation at https://app.swaggerhub.com/apis/microsoft-rs/SSRS/2.0 and It states that I can retrieve the Report defintiion for my reports, however I cannot find any of the endpoints to do such?
From Microsoft docs:
The REST API can also be used to provide more advanced functionality,
such as:
Navigate the folder hierarchy Discover the contents of a folder
Download a report definition
Modify default report parameters Change
or execute a refresh plan A whole lot more
The REST API is a RESTful successor to the legacy SOAP API.
Maybe I am missing something?
I am able to get the Parameter Definitions, the report by ID,
however passing in any parameters such as
https://{myreportserver}/reports/api/v2.0/reports({id})?paramter1=somevalue
does not return any definition. I am trying to get a definition return so maybe I can render the report on a web application (or at minimum provide a pdf download of the report?)
Late to the game, but in case anyone else is looking for this answer, use this URL:
https://{myreportserver}/reports/api/v2.0/reports({id})?Content/$value

issues getting events data using facebook graph api v2.5

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

How do I get a list of discussions for a row using the Smartsheet REST API?

I need to access all discussions for a Smartsheet row via the REST API.
Is there a way to do this? Calling https://api.smartsheet.com/1.1/row/{ID}/discussions, which isn't documented, doesn't work.
The endpoint was a good guess, and its definitely on our radar for implementation in the future. For now, though, you'll need to use the GET /row/{id} using the include query string parameter:
GET /row/{id}?include=discussions
This will give you the entire row object, with an attribute "discussions" that has an array of discussion objects. See this for details.

Getting Logos from Sites with SiteInfo

We are attempting to get site logos from the Yodlee API. From the SiteInfo data model (using the SOAP API), there are the following methods that appear to retrieve site logos
siteInfo.getDefaultSiteLogo()
siteInfo.getLocalizedSiteLogos()
getDefaultFavIcon()
The issue is that these methods for the sites we are using (all sites with the AU geography) are returning null.
I am pretty sure this is possible to do, since Yodlee's own fastlink does show logos for sites as you are adding them.
Here are the method call signatures
I am using the soap api through java (using axis 1.4, just like in the sample code) and the API signatures are as follows
SiteAccountManagementService has the method getAllSiteAccounts which has the following signature
com.yodlee.soap.collections.core.accountmanagement.ArrayOfSiteAccountInfo getAllSiteAccounts(com.yodlee.soap.common.UserContext userContext).
Then there is also getCctx, which has the following signature
public com.yodlee.soap.common.CobrandContext getCctx()
None of these methods have a request specifier parameter of any sought
I don't think icons will be returned by default. I believe you need to specify this in your request specifier to get icons/image.
getAllSiteAccounts API is to get the details for the Accounts aggregated by a consumer,
while the information you are looking for(the Logos) are site related not consumer related.
You should use getSiteInfo(under SiteTraversal) to get this specific detail and remember to pass value of siteFilter.reqSpecifier as 128.

get customfield value for jira issue using JIRA SOAP API

I want to get the values of all custom fields for a particular JIRA issue using SOAP API. I have a custom field named 'Phase' having value Decision Pending for a JIRA issue JIRA-123.
I am using JIRA 5.1.3.
I am able to get all the properties of JIRA issue using SOAP API except the value of the custom field for above issue.
I tried following code, but I am not able to use ComponentManager in my code
IssueManager issueManager = ComponentManager.getInstance().getIssueManager();
CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager();
Issue issue = issueManager.getIssueObject("JIRA-123");
CustomField customField = customFieldManager.getCustomFieldObjectByName("Phase");
Object customFieldValue = issue.getCustomFieldValue(customField);
I would highly appreciate if anyone can provide correct approach.
The SOAP API is deprecated by 5.1.3. I suggest you use the REST API - it is both more easy to use and implement.
What is REST?: read here. The basic idea is to bind HTTP request types to actions, it's quite obvious - check this table for a quick run-in.
Jira has a powerful REST API that you can use. This is the main documentation of the current release.
What do you need to do in some high-level steps?:
Set-Up some type of authentication with your JIRA instance. Be it:
Baisc - example
OAuth - example
Get a list of all fields via the API:
The /rest/api/2/field' [method returns a list of all fields][6] - both System and Custom.
Then when you identify the exact field use/rest/api/2/customFieldOption/{id}` to get the full
representation of the Custom Field Option.
I recommend you use a tools like Chrome REST Console ,or anything similar that you can easily make requests with, to get to know the API. The bonus is that you don't need to setUp authentication if you're logged in through the same browser. Your user will require full admin access though.
This is the root of all JIRA REST API docs. Check it out.
If you're doing this in PHP I would personally recommend using some kind of library. I've used
Guzzle (in a CakePHP environment) for this exact task and it turned out very well.
I'm not sure of how do you use the soap API, here is example of using it via the PHP-SOAP:
#!/usr/bin/php -q
<?php
$soapClient = new SoapClient("https://jira.com/rpc/soap/jirasoapservice-v2?wsdl");
$token = $soapClient->login('user', 'password');
$myIssue = $soapClient->getIssue($token,"TES-13");
print_r($myIssue); // all of the issue details
print_r($myIssue->customFieldValues); // get all custom fields
foreach ($myIssue->customFieldValues as $customFieldValue) {
// search for the right custom field
if ($customFieldValue->customfieldId == 'customfield_10402') {
echo $customFieldValue->values[0];
die();
}
}
?>
In case you want to use any other API, have a look at the JIRA Remote API Reference.
A remark regarding the REST and SOAP APIs -To quote from Jira's site the SOAP API "Supported but no future development". The Rest API is still a bit new and there are things you can't yet do with the REST API (example), and can be done easily using the SOAP API.