How to insert column break using google docs api v1? There are methods like insertPageBreak and insertSectionBreak but nothing for column break.
Unfortunately, what you want cannot be achieved.
When updating a Google Doc, the only options are indeed only the ones to insert a page break or a section break.
However, the ParagraphElement contains a ColumnBreak element. So when creating a document using the below request, you can specify directly where you would like to place the ColumnBreak
Request
POST https://docs.googleapis.com/v1/documents
Body
"paragraph": {
"elements": [{
"startIndex": start_index,
"endIndex": end_index,
"columnBreak": {
"textStyle": {}
}
}]
}
What you can do in this situation is to file a request on Google's Issue Tracker here and provide all the necessary details.
Reference
Google Docs API batch.Update;
Google Docs API ParagraphElement;
Google Docs API documents.create.
Related
I am working with both EWS and the Graph API.
I would like to create events (online meetings with skype/teams) in an calendar that is already available via EWS.
To match the calendar to the one available via Graph API i try to use https://learn.microsoft.com/en-us/graph/api/user-translateexchangeids
The calendar i created has this id when returned by the FindFolder call:
<t:FolderId Id="AAMkAGNiY2YxMjY3LTUxYjgtNGI1Yy1hOTM2LTU4MTM5OTZiNjdjYgAuAAAAAABW2gY0kRG1SqggDTNZN6i8AQAPJkKZ1XJkQ6huFmcVa6XaAAGixNZ3AAA=" ChangeKey="..."/>
<t:DisplayName>Test</t:DisplayName>
I create a request to the graph api:
{
"inputIds": [
"AAMkAGNiY2YxMjY3LTUxYjgtNGI1Yy1hOTM2LTU4MTM5OTZiNjdjYgAuAAAAAABW2gY0kRG1SqggDTNZN6i8AQAPJkKZ1XJkQ6huFmcVa6XaAAGixNZ3AAA="
],
"sourceIdType": "ewsId",
"targetIdType": "restId"}
and get the result
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.convertIdResult)",
"value": [
{
"sourceId": "AAMkAGNiY2YxMjY3LTUxYjgtNGI1Yy1hOTM2LTU4MTM5OTZiNjdjYgAuAAAAAABW2gY0kRG1SqggDTNZN6i8AQAPJkKZ1XJkQ6huFmcVa6XaAAGixNZ3AAA=",
"targetId": "AAMkAGNiY2YxMjY3LTUxYjgtNGI1Yy1hOTM2LTU4MTM5OTZiNjdjYgAuAAAAAABW2gY0kRG1SqggDTNZN6i8AQAPJkKZ1XJkQ6huFmcVa6XaAAGixNZ3AAA="
}
]
}
However, if i call https://graph.microsoft.com/v1.0/me/calendars i get a different id
"id": "AAMkAGNiY2YxMjY3LTUxYjgtNGI1Yy1hOTM2LTU4MTM5OTZiNjdjYgBGAAAAAABW2gY0kRG1SqggDTNZN6i8BwBIq5JjIBY-RqWQllrF0GSkAAAAB353AAAPJkKZ1XJkQ6huFmcVa6XaAAGixNowAAA=",
"name": "Test",
Is there a way to match the (ews) calendar i already have to the one returned by the Graph API?
This is a shot in the dark, because I've never dug this deeply into the weeds on the Graph Ids, but you might try calling Graph with the header that selects "immutable ids." I tried to find some details on what this actually means without much luck.
The header is:
request.Header("Prefer", "IdType=\"ImmutableId\"");
HTH, and if not, sorry for guessing.
I'm trying to use Power Automate to return a custom work item in Azure DevOps using the "workitemsearch" API (via the "Send HTTP Request" action). Part of this will require me to filter based on the value of a Custom Field, however, I have not been able to get it to work. Here is a copy of my HTTP Request Body:
{
"searchText": "ValueToSearch",
"$skip": 0,
"$top": 1,
"filters": {
"System.TeamProject": ["MyProject"],
"System.AreaPath": ["MyAreaPath"],
"System.WorkItemType": ["MyCustomWorkItem"],
"Custom.RequestNumber": ["ValueToSearch"]
},
"$orderBy": [
{
"field": "system.id",
"sortOrder": "ASC"
}
],
"includeFacets": true
}
I have been able to get it to work by removing the Custom.RequestNumber": ["ValueToSearch"] but am hesitant to use that in case my ValueToSearch is found in other places like the comments of other work items.
Any help on this would be appreciated.
Cheers!
From WorkItemSearchResponse, we can see the facets (A dictionary storing an array of Filter object against each facet) only supports the following fields:
"System.TeamProject"
"System.WorkItemType"
"System.State":
"System.AssignedTo"
If you want to filter RequestNumber, you can just set it in the searchText as the following syntax:
"searchText": "RequestNumber:ValueToSearch"
I have a Table in the google docs and want to change its alignment to -0.71 but i do not see any Python API to change table properties. This can be done easily using following UI on google UI (as shown below):
I also tries looking at following requests but could not find it:
updateTableColumnProperties
updateTableCellStyle
For debugging, i created a doc with mentioned alignment and tried dumping JSON of it. But i do not see alignment keyword in the JSON.
Thanks #jescanellas for reply.
I found a hack, this may not be the best solution but works.
1) Update paragraph style and set the indentation, alignment as required. Here the start_idx is the index where table needs to be created.
request = [{
'updateParagraphStyle': {
'paragraphStyle': {
'namedStyleType': 'HEADING_5',
'direction': 'LEFT_TO_RIGHT',
'alignment': 'START',
'indentFirstLine': {
'magnitude': -51.839999999999996,
'unit': 'PT'
},
'indentStart': {
'magnitude': -51.839999999999996,
'unit': 'PT'
},
},
'fields': '*',
'range': {
'startIndex': start_idx,
'endIndex': end_idx
}
}
}]
2) Create the table, it will get created at new indented place.
request = [{
'insertTable': {
'rows': 1,
'columns': 1,
'location': {
'segmentId':'',
'index': start_idx
}
},
}]
It's not currently possible to do so. You can create a Feature Request for the Docs API, and you can also subscribe to this one for Apps Script by clicking on the star next to the Issue number to give more priority to the request and to receive updates.
In case of the second request being implemented, you could call the script from the command line using Clasp.
I have started the programming in swift and trying to implement small search functionality.
I trying to implement search box for searching the different aircraft. For each character entered in search box, result should be refreshed.
I already have a API to get list of aircraft types. sample response type from the API.
[
{
"type": "jet",
"seating": "single-seat",
"engine": "Two-engine",
"name": "Lockheed Martin F-35 Lightning II",
"nativeName": "Lockheed"
},
{
"type": "turbojet",
"seating": "double-seat",
"engine": "Two-engine",
"name": "Heinkel He 178",
"nativeName": "Heinkel"
}
]
How do i search the aircraft using swift and result to be showed in the tableview and for each character entered in search box, result should be refreshed.
I'm using below link for reference but sample code would help a lot.
https://medium.com/#nimjea/json-parsing-in-swift-2498099b78f
Thanks
To get refreshed result from API, You have to check after received Response from API. Please refer below sample code for refreshed result.
if textToAPI != self.searchTextField.text{
self.aryResult.removeAll()
self.tableView.reloadData()
}else{
// Add new record into Array received from API
}
self.tableView.reloadData()
To search for JIRA issues in Java we can use this REST
/api/2.0.alpha1/search?jql&startAt&maxResults
for example:
/api/2.0.alpha1/search?assignee=mehran
but unfrotunately, according to the documentation, the result is in this format:
{
"startAt": 0,
"maxResults": 50,
"total": 1,
"issues": [
{
"self": "http://www.example.com/jira/rest/api/2.0/jira/rest/api/2.0/issue/HSP-1",
"key": "HSP-1"
}
]
}
How can I access the other properties of issues, like: title, description, ...
Well, first of all, why are you looking at an ancient version (4.3) of the API documentation? The latest is 7.2.4, for example.
If you're also running JIRA 4.3 then you're S-O-L as at that point their REST API was in a very early state.
However if your JIRA instance is newer (if it isn't, UPGRADE) then open up the proper documentation # https://docs.atlassian.com/jira/REST/{yourVersion}/. At one point the search endpoint was improved so you could expand issues and specify exactly which custom field values you want to retrieve.