Mention user on description Microsoft Azure DevOps API - html

I'm Using Azure devops API to get the description of a Pull Request and then take that description and paste it into another workitem using update api
This is an example of the description that i copy
Take a look at the **#Susan mention **at the very bottom, this is how it looks on HTML:
My question here is if there is an API to bring the whole description formatted, because this is what i get as description when i use the GET API
"description": "Summary:\nSome modifications to fix an issue in
the **** DPIDs startup code. \n\nBefore:\nThe PID stream startup
function is called continously when the TCM is not
responding.\n\nNow:\nThe PID stream startup is only executed one
time.\n\nTo Test:\nUse the next ECU Emulator
branch:\n*********\nEnable the vehicle and disable the TCM
module. Run the ECU Emulator. Run the Auto Agent. Open the mobile app.
Check in the serial output that The DPIDs are started only
once.\n\n#<6D4D***297> Pulled down on 8/12/2020, no more
looping PID stream startup without TCM. Looks good.",
it would also be nice to know how to attach by this way an image, when i get the description it shows like this: ! [ image (2).png ](https://dev.azu re.com/*/ /_apis/git/repositories/ac324630-b697-4990-ac7a-cb82443762d2/pullRequests/390/attachments/image%20(2).png)**

API can only get data, it's not able to get the page style. You may add the link to access the page directly.

Related

Added request description | AssertionError: expected [] to have a length above 0 but got 0?

How I can solve this issue in post man tired documentation but couldn't find any useful resource please help??
This error occurs in the Student Expert training, when verifying whether you have completed all of the tasks that were requested. Specifically, it relates to this element of the Get specific player request:
Before you continue with scripting, add a description to this
request—the description will appear within the collection
documentation, which you would use if you were e.g. publishing an API
for public use. In the Postman app, at the top of this request tab, to
the left of the request name, expand and and click to edit. Add a
short description of the request (you can use markdown) and click
Save. If you're using the web version, use the little documentation icon to the right of the request.
The test is looking at the Get specific player endpoint and checking whether a description has been set: expected [description] to have a length above 0 but got 0. If you add a description, save, and regenerate your public collection share link, the test will pass.

What is the reason why the OneNote APIs won't return all the pages in a notebook?

I am reading around here and I am seeing multiple messages about the /pages endpoint that is not working a expected
It seems that the OneNote APIs (MS Graph or Office365) are not returning all the pages that the user can see. In particular recent pages are not shown as available.
This message is for those of you who work for Microsoft and who keep an eye on this forum. Please if you have any explanation or workaround for this we would like to hear about it.
If this is work in progress we would also like to know when the APIs can be considered stable and reliable enough to consider them OK for production use
Update:
Permissions or scopes
scopes=[
"Notes.Read",
"Notes.Read.All",
"Notes.ReadWrite",
]
This is for a device authorization flow, the device is acting as a Microsoft Online account. The app is registered to Azure as personal app but the enterprise one does the same
The authorization process is described here
What type of app/authentication flow should I select to read my cloud OneNote content using a Python script and a personal Microsoft account?
After that I am using this endpoint to get the notebooks
https://graph.microsoft.com/v1.0/users/user-id/onenote/notebooks
from the returned json I pick the endpoint for the notebook I want to read and I access the endpoint the link stored in notebook['sectionsUrl']. This call returns a sections json
From this I pick the section I want and I access the link stored in section['pagesUrl']
Each call returns the expected info excepting the last one, when I get an arbitrary low number of pages in the section I want to explore. There is nothing wrong with the format of the info, it is just incomplete or not up to date
Not sure if this is related but when I try to access the pages in a section from MS Graph Explored I am seeing the same behavior (not all the pages are reported). This is a shared notebook and I am using the owner account for all the above so it should not be a permission problem
from msal import PublicClientApplication
import requests
endpoint= "https://graph.microsoft.com/v1.0/me/onenote"
authority = "https://login.microsoftonline.com/consumers"
app=PublicClientApplication(client_id=client_id, authority=authority)
flow = app.initiate_device_flow(scopes=scopes)
# there is an interactive part here that I automated using selenium, you
# are supposed to ouse a link to enter a code and then autorize the
# device; code not shown
result = app.acquire_token_by_device_flow(flow)
token= result['access_token']
headers={'Authorization': 'Bearer ' + token}
endpoint= "https://graph.microsoft.com/v1.0/users/c5af8759-4785-4abf-9434-xxxxxxxxx/onenote/notebooks"
notebooks = requests.get(endpoint,headers=headers).json()
for notebook in notebooks['value']:
print(notebook['displayName'])
print(notebook['sectionsUrl'])
print(notebook['sectionGroupsUrl'])
# I pick a certain notebook
section=[section for section in sections if section['displayName']=="Test"][0]
endpoint=notebook['sectionsUrl']
pages=requests.get(endpoint,headers=headers).json()
for page in pages['value']:
print(page['title'])
Update2
If I use this endpoint
https://graph.microsoft.com/v1.0/users/user-id/onenote/sections/section-id/pages
I would expect to get the complete list of pages for that section.
That is not working
After reading again and again the docs I my understanding is that the approach is to
call https://graph.microsoft.com/v1.0/users/user-id/onenote/pages$fiter or search etc etc
I this correct?
Also I vaguely remember there is a way to search for a section and have it expanded so that the search returs the children too.
Am I close to understanding this?
Thank you
MM

How can I get microphone dB level in a script?

I would like to get microphone input level in spark ar script for an AR filter I'm developing.
It looks like this existed at this link at some point but the page is empty now: https://sparkar.facebook.com/ar-studio/learn/documentation/tutorials-and-samples/audio-analyzer-and-energy-meter/
I tried to create a bit crusher patch and connect its output to a value patch and pass that to script but spark ar shows an error: "Please check the patch graph and try again"
Also I have no idea what type that would be so I can't read it on the script.

Cannot create notebook immediately after creating group (modern group not

With Microsoft Graph I would like to create a Group and then after that create a Notebook (onenote) in that group directory.
First I execute a HTTP call to :
POST /groups
with the required access token in the header and JSON object of the Group in the body. (http://graph.microsoft.io/en-us/docs/api-reference/beta/api/group_post_groups).
If successful it will return a JSON object with the complete property of the group.
So far there was no problem, I've managed to get the {ID} (in GUID) of the group which will be required to create a notebook. Let's say for this example the {ID} of my Group is 123456789-abcd-4321-bbbb-9876543210aaa
Next for the notebook I execute a HTTP call to :
POST /groups/{ID}/notes/notebooks
And then I got following JSON response :
"error": {
"code": "20160",
"message": "No modern group was found that matches the ID 123456789-abcd-4321-bbbb-9876543210aaa",
"innerError": {
"request-id": "85b85297-ad3b-424d-b18f-2b1da904f5fc",
"date": "2016-01-29T08:19:27"
}
I've tried so many things to get a workaround for this issue. One time I set a break point between the method to create group and the method to create notebook in my program. I ran my program until the point it has finished creating the group. Then I stop, and try to open notebook tab from Office365 website in the browser and I found this :
In English it means "We are creating your notebook. It may take a few minutes. We will finish this even if you close the browser". I took about 10 seconds before I was redirected to OneNote Online page (the url is my sharepoint tenant name).
After that I continue my program and suddenly it successfully created the notebook.
I need some help here! I need to create the notebook immediately after creating the group without having to open up a browser. I think it has something to do with sharepoint sites creation for the Group.
Any help would be appreciated!
Creating groups does take some time (usually ~ 5 minutes).
It is recommended that you first query to see if group has been created or not and then create the notebook.
you can query drive endpoint to find if group has been provisioned.
GET /beta/groups/{id}/drive

Where can I see Asterisk REST recordings listing?

I have recently installed FreeBPX with asterisk included. I activated the rest interface, so I can see /ari/asterisk/info and it responds with a JSON. Now I want to see all my call recordings. I configured recordings and the server saves them in wav format. It's ok, but how can I see them through json/rest? I tried open /ari/asterisk/recordings, but it responds with "resource not found".
As yo can see in the docs, you can use:
GET /recordings/stored/{recordingName}
EDIT: You can see the list of recordings stored with
GET /recording/stored
You are missing the point here, the ARI recordings interface isn't meant to be used with the files that you have stored via FreePBX. The recordings API is meant to allow you to manage recordings, from within a Stasis application. That means, start a recording from a Stasis application and manage it. If the recording had been performed outside of Stasis, the ARI engine will not be aware of it.
Well, at least that's what it's supposed to do.
Nir
This is partly doable - FreePBX doesn't seem to use the native Asterisk recording APIs so you can only retrieve the filename
First get all the channels:
GET /ari/channels
Find your channel's ID from the response's id field
Then you can request the variable CALLFILENAME from the channel's variable endpoint:
GET /ari/channels/{id}/variable?variable=CALLFILENAME