Having trouble at the documenation how to use Graph API to access a sharepoint via its web url.
So something like https://mycompanydomain.sharepoint.com/sites/my_site_name
It appears what are you after is Access a site by server-relative URL:
If you have the server-relative URL for a site resource, you can
construct a request as follows:
GET /sites/{hostname}:/{server-relative-path}
In your case the request should look like this:
GET https://graph.microsoft.com/v1.0/sites/mycompanydomain.sharepoint.com:/sites/my_site_name:/
If you have the weburl the safest option it to use the shares API.
Encode the URL as described here
Use it as the shareid and request the site
Using the URL you provided in your example, the request that I would make would look like:
https://graph.microsoft.com/v1.0/shares/u!aHR0cHM6Ly9teWNvbXBhbnlkb21haW4uc2hhcmVwb2ludC5jb20vc2l0ZXMvbXlfc2l0ZV9uYW1l/site
Related
when you access the homepage, A lot of APIs will be exposed.
But I have the baseURI and BasePath of the API I want.
For Example, When you connect to http://www.example.com, Among various APIs, an api called http://www.example.com/person/ajaxPersonList?name="Doe"&Age=30 is also called.
This API has a variety of params
So, if i know baseURI(http://www.example.com) and basePath(person/ajaxPersonList)
Is it possible to get params using restAssured?
The answer is NO.
If you are working on this project, you can access API document. You can see the params that each API is using.
If you are investigating the web app online, you have to try and error.
Is AZURE search using c# is based only on ServiceName, IndexName and APIKEY.
Why aren't we using the URL?
I have looked into many document regarding the everything lead by APIKEY only.
Then what is the use of URL?
Because while querying from Post master we are using URL and Service version also but not while querying form C#.
Knowing the search service name is the same as having the API URL.
From the documentation, once you have the search service name, you can construct the URL like this:
GET https://[search service name].search.windows.net/indexes?api-version=2019-05-06
Essentially what I'm looking for is how to get the results like in this API request but by using just a url to make my results appear on a webpage. I think I need to add all of the data in the "request" Tab to the url written at the top of the picture and I'm not really sure how add it correctly:
You can't.
Twitter's API requires an "Authorization" header in the request. You can't do it through a URL alone. See Authorizing Requests.
I'm making oauth with Zendesk and I need to add redirect urls to api client on Zendesk. What I want to do is to accept all urls that starts with example.com/something/. For example:
Is it possible to do and if yes how?
Nikola,
It is not possible to have dynamic redirect URLs. Security is the main reason for this. Is it possible for you to collect whatever data is being used in the path as a parameter?
It is not possible to have dynamic redirect URLs.
In our case, we've decided to save that url in cookie. Then we redirect our user from oauth to the same page ("Thank you for allowing access to our app"), and then redirect it to specific url saved in cookie.
I'm trying to UrlFetch the RSS/Atom feed from my site's news page "posts" URL https://sites.google.com/a/mydomain/my-site/my-announcements-page/posts.xml. It works in the browser for me as a logged user.
I am wanting to to do a Urlfetch because it seems to be a super fast way to get a count of pages and dates (<2 seconds). Doing it via the SitesApp Pages iteration or search takes 5 to 25 seconds). The site is a tiny one with lightweight content and < 50 pages.
Anyway, so I want to UrlFetch my site's posts URL and I guess I need an OAuth scope and get a token.
I have tried the scope "https://sites.google.com/feeds/" from the gdata Sites API https://developers.google.com/google-apps/sites/docs/1.0/developers_guide_protocol#Auth and using it on the Oauth Playground 2.0 and it works for documented API feed urls but not for my site's posts.xml URL. I get a 401 "Token invalid - AuthSub token has wrong scope" when I try to access that in the playground.
So my question is: Is it possible to use Urlfetch with an oauth token to access the pages's posts.xml? What OAuth scope do I use to get the token?
UrlFetchApp currently supports only OAuth 1.0. Try using that instead.
Just to close off this question. I didn't find a way to access the pages's posts.xml via a urlfetch. Instead, I created my own ContentService function to return as text the number of the page's children published since a particular time via myAnnouncementsPage.getChildren().