I am attempting to upload a file to a socrata site using their REST API. The file(s) I am trying to upload can be access directly by my application and could be serialized, or I could point Socrata to a url. The rest of the datatypes I am using are pretty straight forward; strings, dates, ect. But I can't seem to find any documentation on how to upload a file using REST with Socrata.
Is it even possible?
Thanks in advance.
There's no "official" way of uploading files to Socrata, hence no documentation. If you want to attach a file to the dataset programmatically, then what existing libraries (Java in this example) do is use the /api/assets endpoint (which, if I'm not mistaken, is what the UI uses for uploading documents) and do a multipart POST.
soda-java's SodaDll::addAsset()
soda-java's HttpLowLevel::postFileRaw()
Related
I am currently working in outsystems. I have an interface there which allows end users to upload files. But its getting uploaded to the Outsystem server, is there a way I can upload files to my own file server
I couldn't find any setting where I can change the server
It all depends on your file server I guess. Personally I upload files to a OneDrive using Microsoft's graph API. With this I am able to send binary data that I've uploaded via the OutSystems widget to this specific OneDrive. This works in traditional, reactive and mobile for as far as my experience goes.
Also, as mentioned before, the FileSystem extension from the forge is generally pretty useful for this kind of stuff.
I need to upload very large files (approaching hundreds of gigs). I am planning to upload smaller parts (out-of-order and in parallel) and then use the Object Compose API to compose them into one large Object (hierarchically if necessary). However, I cannot see any appropriate API in the C# client libraries (Google.Cloud.Storage.V1 2.4.0-beta03) which would do the same as the JSON API at https://cloud.google.com/storage/docs/json_api/v1/objects/compose. Do I have to use the JSON API?
I'll answer my own question. As of this date, the source code (https://github.com/googleapis/google-cloud-dotnet, commit 1b2de06f70e31382ef4d6de9062b30ce64dfb463) contains no meaningful mention of compose or concatenate except as a possible TODO comment.
I want to fetch table data from the website using perl: http://finance.yahoo.com/quote/LBJ/history?period1=946665000&period2=1470162600&interval=div%7Csplit&filter=split&frequency=1d
but it's source code does not contains any data of table which we can see on website, there is one download link but that downloaded data is not same as data shown on website.I want stock split information shown on this website, yahoo provides download link to download that data but here downloaded data is different then they shown on website, by mistake they provide dividend history information,but I want split history information.
The page is built using a number of Javascript calls.
You should use the developer tools that are built in to your browser to trace all of the HTTP requests that are used to build the page. One of them will return the data which is used to build the table. Hopefully you will be able to recreate that call to get the data directly. It's likely that the data will be returned as JSON, which will make parsing it much easier.
Update: It's worth adding that sites often build pages this way precisely because they don't want people to scrape their data. Have you checked the terms and conditions of the site? Are you allowed to access the data this way? HAve you looked to see if you can get this data through an API?
I'm developing a REST API using Zend Framework. I would have to be able to generate reports as .pdf documents.
How would it be handled? Would the URI be something like http://api.example.com/reports ?
Since I'm actually generating it every time based on the input values, would that be against REST principles (i.e. not being cacheable) ? Could the input values be sent as binary (in order to do something like HTML to PDF) ?
Also, if there were multiple types of reports, how would the client be able to select which report to generate ? Would I be having ids similar as if it were a usual resource (so that I would have http://api.example.com/reports/<reportId>) ?
What would the business logic be? Should I save the file on the server and return a download link? Would I return the .pdf document as binary without saving it on the server?
You can set the request-header 'Accept' to 'application/pdf'. You could also specify in your URL that you are requesting a PDF-document by using URL-parameters: http://api.example.com/reports?type=pdf
http://api.example.com/reports/<reportId> is a good way to present individual reports to the user.
How you implement it depends on your needs. Will you need to generate the same reports a lot? If you don't need them much, I don't see the need for you the keep them on the server.
There seems to be no available documentation for the Objective-C client for the Google Data API. Google's API help webpage only has options for .NET, Java, Python, and the HTTP Protocol. I want to access data from a spreadsheet on my Google Docs account, and then add new data.
I have added the correct source codes to my project as outlined in the GData Wiki, and am now completely lost. There are a ton of classes to sort through for Spreadsheets, and there are very few comments and I can't really tell by method names what does what.
If possible, can someone post a couple snippets of code to first access the available documents, then pick one of the choices, and then add information to a cell (like A1)?
Thank you in advance for your consideration!
Did you look at the spreadsheet sample?
http://code.google.com/p/gdata-objectivec-client/wiki/GDataObjCIntroduction
A year or so later, a page for just this: Google Data APIs Objective-C Client Library
Generally, to create a new entry, you'll use an http POST to the feed's postLink. The Obj-C library service class provides POST operations as the method fetchEntryByInsertingEntry:
I believe creating a new spreadsheet still requires uploading a new document, as mentioned in the docs. You could create a simple CSV text file and upload that as a spreadsheet.
Note that there is a discussion group for users of the library.