get author from Confluence CQL Search String Version 3 - get

How is it possible to get the author (from pages, comments, etc) for the search results with the Confluence CQL API Version 3.0?
For my search the API search Version 3.0 is necessary
This one gaves no Content snippet back:
https://myconfluence.site/rest/searchv3/1.0/search?queryString=SEARCHTEXT&startIndex=0&where=conf_all
The function "&expand=body.storage" doesn't work for me.
The only results i get are:
id,
title,
bodyTextHighlights,
url,
searchResultContainer
--name
--url
friendlyDate,
contentType,
metadata,
Anybody an idea? Thanks a lot.

I tried another search API to get the page creator and this works for me.
Instead of body.storage, you can expand history to get the creator of a page.
The rest call
/rest/api/content/search?cql=id=<pageId>&expand=history
leads to an output like this and you can walk through till the creator
{
"results": [{
"id": "123456",
...
"history": {
"latest": true,
"createdBy": {
...
"username": "Some.Name",
"displayName": "Some Name",
"userKey": "123456"
}
}
...
}

Related

Associated PXSelect/PXSelectReadOnly Returns Nothing on Sales Order Through OpenAPI

I've introduced a new DAC and a new field on the Sales Order associated to the new DAC key. When trying to retrieve the information through OpenAPI it comes back empty. I'd like to know why and how I can adjust my code to return the information. I've tried both PXSelect and PXSelectReadOnly
Declaring Statement on SOOrderEntry(extension):
public PXSelect<IOCSCompanyBrand, Where<IOCSCompanyBrand.companyBrandNbr,
Equal<Current<SOOrderExt.usrCompanyBrand>>>> CompanyBranding;
When I hit the URL: http://localhost/Acumatica21/entity/AcumaticaExtended21R1/20.200.001/SalesOrder?$select=OrderNbr,CompanyBranding,OrderType,CompanyBrand&$expand=CompanyBranding&$filter=OrderNbr%20eq%20'SO-030003'
This is the data that is returned:
[
{
"id": "f827cb43-9b8a-ec11-a481-747827c044c8",
"rowNumber": 1,
"note": {
"value": ""
},
"CompanyBrand": {
"value": "IO"
},
"CompanyBranding": null,
"OrderNbr": {
"value": "SO-030003"
},
"OrderType": {
"value": "SO"
},
"custom": {}
}
]
Acumatica Version: 21.205.0063
Here's the definition for SalesOrder in the endpoint (which was populated via the GUI)
I ended up opening a Acumatica Developer case and here is their response.
Hi Kyle,
Thanks for your time yesterday.
Endpoint mapping is valid but the fields in the view isn't fetch due the limitation of the filter parameter in the request. Filter parameter optimizes the data that are being fetch. In the case, the customer view isn't fetched. To workaround the limitation, instead of using filter, you can try something like below,
http://localhost/Acumatica/entity/AcumaticaExtended21R1/20.200.001/SalesOrder/SO/SO-030007?$expand=CompanyBranding
You can fetch the record and use expand to get the detail level fields. This way you can avoid the limitation of the filter.
Please check and let me know if you have any questions.
Regards,
Vignesh

Get all entries with included images using Contentful REST API

I am using typescript,and the Contentful-ManagementAPI (that's the reason I'm not using the SDK client), and I want to retrieve all entries from a specific type. I am calling th Api like this:
axios.get("https://api.contentful.com/spaces/" +
space_id +
"/entries?content_type=" +
content_type+"&include="+2)
I am receiving all the entries requested, but in the image field I am getting this:
poster:en-US:
sys:
{type: "Link", linkType: "Asset", id: "222xxm9aaAu4GiAc2ESw0Q"}
So, How could I get the image URL?
I would appreciate any help. Thanks
From the Contentful docs:
The CMA does not support the include and locale parameters.
So, I might be better using the delivery api for retrieve content, and the management api for create/update/delete. That's the way it should be used.
The referenced assets and entries can be found in the includes object in the API response.
The response should look something like this:
{
"sys": {
"type": "Array"
},
"total": 9,
"skip": 0,
"limit": 100,
"items": [ // Your items here ],
"includes": {
"Asset": [ // Your included assets here, this is where you find the url to the image ]
"Entry": [ // Any referenced entries not included in the items array above ]
}
So to find the actual asset that includes all your data (including the url) you would have to find the correct asset, using the id of the reference (222xxm9aaAu4GiAc2ESw0Q), in the includes.Asset object.
Try include=10, If you are using multi locales provide fallback for each locale.
This worked for me.

Get all root sites listed in share point Admin center using graph api beta

I need all root sites listed in share point Admin center shown in image
For that i am using Graph api like follows,
var settings = {
"async": true,
"crossDomain": true,
"url": "https://graph.microsoft.com/beta/sharepoint/sites",
"method": "GET",
"headers": {
"authorization": "Bearer token",
"cache-control": "no-cache",
"postman-token": "3116b007-e574-5ad4-aedd-3b35fbf76b61"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
But it gives output as follows,
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#sharePoint/sites",
"value": [
{
"createdDateTime": "2017-02-18T13:03:01.263Z",
"description": "",
"id": "2422c3a2-3c51-40f1-8483-5454aead43c4,412bb897-c754-460a-962d-db22893a1649",
"lastModifiedDateTime": "2017-04-24T02:16:43Z",
"name": "",
"webUrl": "https://mps330124.sharepoint.com",
"root": {},
"siteCollection": {
"hostname": "mps330124.sharepoint.com"
},
"siteCollectionId": "2422c3a2-3c51-40f1-8483-5454aead43c4",
"siteId": "412bb897-c754-460a-962d-db22893a1649"
}
]
}
How can i achieve it Using graph api beta
Using the asterisk on the site search endpoint seems to work
https://graph.microsoft.com/v1.0/sites?search=*
returns
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites",
"value": [
{
"createdDateTime": "2017-09-15T01:11:50Z",
"description": "Let's capture our thoughts in this subsite blog.",
"id": "xyz.sharepoint.com,5a58bb09-1fba-41c1-8125-69da264370a0,5e9767b8-95bc-4bd1-aeb0-defabcdefabc",
"lastModifiedDateTime": "0001-01-01T08:00:00Z",
"name": "internalblogs",
"webUrl": "https://xyz.sharepoint.com/internalblogs",
"displayName": "Internal blog"
},
{
...
}]
}
There isn't a way to retrieve a full list of site collections via Microsoft Graph. That functionality is "admin only" in the SharePoint API and has not been made available via Microsoft Graph.
We're working on some changes to the SharePoint Sites API for Microsoft Graph that will be rolled out over the next few weeks to make it possible to search for a list of sites / site collections, but we still don't have plans to make available the ability to enumerate all sites / site collections via Microsoft Graph.
Watch the Change Log around the Build 2017 conference (May 10-12) to find our all the details.
There now seems to be a way to get a list of the top level site collections via the following request:
GET https://graph.microsoft.com/beta/sites?select=siteCollection,webUrl&filter=siteCollection/root%20ne%20null
The following page documents this (update September 19th): https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/site_list
My own test though didn't bear any fruit, because the API returns a Cannot enumerate sites error. An alternative approach would be to use the search query parameter (docs updated September 20th):
GET https://graph.microsoft.com/beta/sites?search=contoso&select=siteCollection,WebUrl&filter=siteCollection/root ne null
But this only provides the siteCollection for the root :/ with a list of all sites and their webUrl of the other siteCollection's (like the default ones /sites & /teams) but not the actual url/hostname of the siteCollection they belong to. Though that could be extracted from the webUrl path component.
What you are getting is not an error.
If you follow the siteCollectionId with the URL https://graph.microsoft.com/beta/sharepoint/sites/2422c3a2-3c51-40f1-8483-5454aead43c4/sites you get a list of the sites in that site collection.

Instagram Tag Recent search always return null array

I wanna find specific tags media and these infos.
And, followed instagram API Document.
But, specific tags media API always returnd null array.
I tried this step.
Get a AccessToken
https://api.instagram.com/oauth/authorize/?client_id=[C_ID]&redirect_uri=http://localhost:3001/instagram/callback&response_type=token&scope=basic+public_content+relationships
Redirect And return accestoken
http://localhost:3001/instagram/callback#access_token=ACCESS_TOKEN
Find specific Tag(ex. snow)
https://api.instagram.com/v1/tags/snow?access_token=ACCESS_TOKEN
Returned,
{
"meta":
{
"code": ​200
},
"data":
{
"media_count": ​11664,
"name": "snow"
}
}
And Find Specific tag media list
https://api.instagram.com/v1/tags/snow/media/recent?access_token=ACCESS_TOKEN
Returned,
{
"pagination":
{
"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"
},
"meta":
{
"code": ​200
},
"data": [ ]
}
Why return null array?
And what is max_tag_id, min_tag_id?
You are almost definitely seeing no results because the hashtag you are searching for has not been used in your last 20 posts.
This is a short article explaining how the new Instagram API works.
TL;DR: If your app is in sandbox mode, it can only see see the past 20 posts by you or your Sandbox users.

Drupal 7 Search Autocomplete module never loads "suggestions"

I am attempting to use the module Search Autocomplete 7.x-4.0-alpha2.
I have added a form in the "search_autocomplete" configuration section.
It is enabled.
I created a view that returns taxonomy in json format.
Here is an example of the json output from the json view
[{
"value": "aquaculture",
"fields": {
"name_i18n": "aquaculture"
},
"group": {
"group_id": "aquaculture",
"group_name": "aquaculture"
}
}, {
"value": "climate change",
"fields": {
"name_i18n": "climate change"
},
"group": {
"group_id": "climatechange",
"group_name": "climate change"
}
}, {
"value": "coastal development",
"fields": {
"name_i18n": "coastal development"
},
"group": {
"group_id": "coastaldevelopment",
"group_name": "coastal development"
}
}, {
"value": "deforestation",
"fields": {
"name_i18n": "deforestation"
},
"group": {
"group_id": "deforestation",
"group_name": "deforestation"
}
}, {
"value": "extinction",
"fields": {
"name_i18n": "extinction"
},
"group": {
"group_id": "extinction",
"group_name": "extinction"
}
}]
I set the Suggestion Source to be the view. I used the autocomplete feature of it so I know that my "search autocomplete" suggestion source is configured right. The id selector of a form in a different view (not the json taxonomy one) is used. The permissions for the module are correct.
Now, when I load my view that has the search api form I see a little blue circle icon that is circling to the right of the search api form field. It is circling the whole time and no suggestions are ever populated in the search text box.
I know I have the right form configured because if I set a different form id for the "searchautocomplete" configuration and reload the view page, the circling blue circle is missing.
Does anyone have any idea what might be wrong?
UPDATE: I was going to my modules page and saw this error (i wasn't changing anything on the modules page, just going there) and saw the error on the top of the modules page regarding the Search Autocomplete module
Update: I changed the Search Autocomplete configuration section to not point to my json view but point to an outside url, http://google.com. Of course this is not a valid json endpoint, but I wanted to see if I could see it at least attempt to get it's json data from google.com. Watching through firebug has shown that it doesn't even attempt to go to google.com for it's json data. I think something similar is happening with my json views (it's just not even going there for the data).
That was probably due to a bug in the alpha-version? When you configure the JSON Endpoint by using the Views UI, you should see a list of items in the "preview"-section underneath. The items that are listed there should be the ones that appear as suggestions in the search.

Resources