Found many examples on simple API queries but nothing close to what i want.
I have my space key and page ID, this is my table
How can i append hyperlinks, and attach a file in cell 3 for each build using REST API.
get the page : add expand=body.storage as a query parameter to get the body.storage.value which holds the html tags. Then parse the get response to edit the specific value in the 's then when updating the page update the body.storage.value withing your json like in the example: https://docs.atlassian.com/atlassian-confluence/REST/latest-server/#content-update
Related
I'm new to getStream.io and i'm retrieving feed from flatfeed don't know how to paginate response in flutter.I know we pass offset and limit but how could I know to change offset value dynamically.
Paginated methods such as flatFeed.getPaginatedEnrichedActivities return a json response with a field "next". This field is something of this order:
"/api/v1.0/enrich/feed/user/sacha/?api_key=$keyField&id_lt=$idLtField&limit=$limitField"
Essentially you need to parse the URL parameters limit and id_lt in order to query the next page and so on until "next" is null.
We have simplified this process in the core package with loadMoreEnrichedActivities. In the tutorial there is an Activities Pagination section where you can read more about it
What is the correct API syntax for using the custom_file_ids[] query parameter to specify multiple fields (but not all) in the CLIO API contacts result set? I need to specify multiple custom fields. I can get it to work for a single field, but not multiple fields at the same time.
Specifically, how do I specify and delimit the multiple fields? I have tried the following:
custom_file_ids[]=1234567,2345678
custom_file_ids[]=[1234567,2345678]
custom_file_ids[]=(1234567,2345678)
custom_file_ids[]={1234567,2345678}
custom_file_ids[]=1234567:2345678
The API documentation at https://app.clio.com/api/v4/documentation is silent on the list syntax that it expects.
Below is one specific API call I tried (both the actual URL-encoded call, and a decoded one for clarity) using a simple comma-delimited list, but which only returns custom field data for the first ID in the list--not the second. If I enclose the ID list in any kind of brackets (per above), the endpoint returns a 404 error.
https://app.clio.com/api/v4/contacts?custom_field_ids[]=1234567%2C2345678&custom_field_values[4529224]=true&fields=id%2Cname%2Cprimary_address%2Cprimary_work_address%2Cis_client%2Ctype%2C%20primary_email_address%2Cprimary_phone_number%2Ccustom_field_values%7Bid%2Cfield_type%2Cfield_name%2Cvalue%2Ccustom_field%7D
https://app.clio.com/api/v4/contacts?custom_field_ids[]=1234567,2345678&custom_field_values[4529224]=true&fields=id,name,primary_address,primary_work_address,is_client,type,primary_email_address,primary_phone_number,custom_field_values{id,field_type,field_name,value,custom_field}
Try:
custom_file_ids[]=1234567&custom_file_ids[]=2345678
I was able to do this with Contacts Custom Fields by putting custom_field_id[] on the URL as many times as you have IDs.
I hope this helps.
I need to get the last modified timestamp property of a sheet using Smartsheet API 2.0 (preferably Python SDK).
Ref:
https://smartsheet-platform.github.io/api-docs/
https://github.com/smartsheet-platform/smartsheet-python-sdk
Using Sheets.list_sheets I am able to get the 'modifiedAt' property (along with other properties) for all the sheets that I have access to.
Using Sheets.get_sheet(sheet_id) I get all the data (rows, columns) for the specified sheet.
How do I get only the 'modifiedAt' (it's OK if some other small properties are also present) for a specific sheet with a known sheet ID. I don't want the row, column, cell information to be present in the API response.
I wrote to Smartsheet support team and their answer served my purpose.
Thanks for contacting Smartsheet Support. In order to narrow down the
response that you're getting, you can use the exclude parameter:
http://smartsheet-platform.github.io/api-docs/#query-strings. In my
testing, I excluded all rows and columns where columnIds=0 and
rowIds=0. That left me with only the Sheet information, which includes
the modifiedAt for the sheet. You may be able to limit it further, but
the result I got from this was pretty short and sweet.
(Python SDK example)
response = ss_client.Sheets.get_sheet(MY_SHEET_ID, column_ids='0', row_ids = '0')
Using the above parameters, I was able to exclude all the sheet data and got only the metadata (which included modifiedAt property).
Basically my intention was to run a sync script periodically and store the Smartsheet data into my local db. I wanted the API response to skip the actual Sheet data (rows, columns, cells) if nothing would have changed since the last execution. Another nifty way of achieving this to use the ifVersionAfter parameter.
ifVersionAfter (optional): If version specified is still the current
sheet version, then returns an abbreviated Sheet object with only the
sheet version property. Otherwise, if the sheet has been modified,
returns the complete Sheet object. Intended to allow clients with a
cached copy to make sure they have the latest version.
last_version_fetched = 7724
response = ss_client.Sheets.get_sheet(MY_SHEET_ID, if_version_after=last_version_fetched)
The Get Sheet call will always return the content (row, column, data) from a specific sheet. While there is an 'exclude' query parameter that can filter out some properties, it does not work on the primary sheet data returned from the /sheets/{sheetId} endpoint.
The Sheets.list_sheets call seems like the easier route if you only need the modifiedAt property. I would use that one then iterate over the results until you find the matching id.
Giving a PostId i'm trying to retrieve all the comments attached to this post by using the graphApi. Its simple to retrieve the comments for the first time, i just keep following the next link in the paging propertie of the api response.
But to keep this list of comments up to date i need to retrieve the newly added comments. I tried using the cursor After (stored from the last retrieved page) but it's not working as expected, using the parameter since in the query doesn't work either (seems that it is not supported by the endpoints /comments).
Can please someone gives me an alternative solution?
As i said 'since' is not supported by the endpoint '/comments' because the api use cursors for the pagination (next, after and befor fields).
The use of the cursor 'after' will not work neither, because the its value is valide for a short period of time (docs link)
So my solution was to use an ordred query to get the comments
https://graph.facebook.com/v2.6/[post-id]/comments/&filter=stream&order=reverse_chronological
, i save the created_timeof the first comment as last_update_time. Then the next time i execute my code i check for each comment the time when it has been created if it's grater than the last update time i save it
while (comment.created_time > last_update_time):
comments_list.add(comment)
comment = comments.next()
if (len(comments_list)>0):
last_update_time = comments_list[0].created_time
I am trying to create nested FB Graph API request to get images for public event.
The full JSON object is given at this gist: https://gist.github.com/ZeKoU/be92b88440a6ca3d6be3
What I am trying to do is to get only data.0.images object, i.e. I want to get first object from data , then to get images array, and then to pick some fields from there (source for example).
However, all my attempts (see picture below) are returning only two fields for each object inside data field.
Not sure what you're trying to do, but from what I understood the query
/310897782446456?fields=photos.fields(id,images{source}).limit(1)
should be an example of getting the first photo, extract only some fields from the object (id and images for example), and then get a single field (source for example) from the images array's objects.
https://developers.facebook.com/tools/explorer?method=GET&path=310897782446456%3Ffields%3Dphotos.fields(id%2Cimages%7Bsource%7D).limit(1)&version=v2.3
See
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#fieldexpansion