how to get all the files present for a particular commit id in bitbucket using rest API? - bitbucket-api

I want to get all the files present for a particular commit Id in bitbucket server using rest API. Is there any api to get the complete data ?

Hi you can use this..
rest/api/1.0/projects/{projectname}/repos/{reponame}/commits/{commit
id}/changes
The reply will contain (among other information) the details of each files modified in the commit.
As an example, this is the related section from the entire json output:
path: {components: ["file1.txt"],parent: "",name: "file1.txt",extension: "txt",toString: "file1.txt"},

You are looking for this endpoint: https://docs.atlassian.com/bitbucket-server/rest/6.4.0/bitbucket-rest.html#idp178
GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/archive?at={commitId}
With this you will get in default a zip file with all the files at this specific commit. Following the link you can get more information about the endpoint.

Related

How to view post/put/patch data

When error occurs, I want to see the data payload uploaded by users.
I wasn't able to find the post/put/patch data in apm report. (kibana)
Is there an option I need to turn on for this?
Most agents have a CaptureBody config option, with that you can capture the request body. It's off by default - you can set it to error.
I linked the Java docs, you should be able to find the same config for (I think all) other agents.

import individual files automated to firestore with the POST: https://firestore.googleapis.com/v1beta1/{database}/documents.commit?

As the title suggested, can I post with the: https://firestore.googleapis.com/v1beta1/{database}/documents.commit command a single JSON file directly in my Firestore database and will they be processed? Added to the collections etc? Or should I go with POST projects.databases.documents.createDocument. I was reading this documentation
I want to put json files from different sources in to my Firestore database to build up my collection.
And where should I put the filename of the json file that I want to upload?
Thanks!!
You can see here [1] the usage of both calls:
documents.commit= Commits a transaction, while optionally updating documents
documents.createDocument= Creates a new document
For using the JSON in the API call you need to send a POST request, check this question [2].
Also, regarding your last comment, you can start collections and add documents using the Firestore UI, but also you can do that using client libraries in different languages (Python, Java, Go...). Here is a list of "How to"s regarding Firestore [3].
In case you think that some features are missing, you can always file a Feature Request following this link [4] (as Firestore is still not there, I would choose Datastore), but keep in mind that Firestore is still in Beta.

Is there any way to input the result got from the curl via fluentd?

We are seeking the most simple way for sending alfresco's audit log to elasticsearch.
I think using the alfresco supplying query and getting audit log would be most simple way.(since audit log data is hardly watchable on db)
And this query processes the effect measure as json type then I'd like to download the query direct using fluentd and send to elasticsearch.
I roughly understood that it would ouput at elasticsearc but I wonder whether I can download 'curl commend' using query direct at fluentd.
Otherwise, if you have other simple idea to get alfresco's audit log then kindly let me know.
I am not sure weather I understood it fully or not but based on your last statement I am giving this answer.
To retrieve audit entries from alfresco repository you could directly use REST APIs of Alfresco which allows you to access them.

Simulating CMIS Atom API doesn't load the information properly

I was requested to simulate a CMIS Atom API for my company's content management using our API. but I'm stuck in what it seems to be something simple. So I'm trying to load the CMIS TCK, but for some reason the values of the responses doesn't make it into the next request. So I think I'm missing something.
The first request I get is to getRepositories
/cmisatom/getRepositories
Then I get the request to get a specific repository
/cmisatom/getRepositories?repositoryId=c9ad76c6-d121-4a32-bb14-e5d43bf91ee6
Which kinda tells me that the data from the first request was parsed properly.
Now on the third request is where things get weird. I get the request for the id
/cmisatom/c9ad76c6-d121-4a32-bb14-e5d43bf91ee6/id?id=&filter=&includeAllowableActions=&includeACL=&includePolicyIds=&includeRelationships=&renditionFilter=
but no information of the id, not filter nor anything else, was loaded. I'm matching the responses to a alfresco CMIS Atom that I have running on my local. So the response its identical except for the jsession. Can you share any guidance on this?
The steps go like below.
Service document is the first one to fetch - your example refers to it as "/cmisatom/getRepositories". This lists the list of all repository data. It also includes the repository url templates like OBJECT_BY_ID, TYPE_BY_ID etc. That means, for navigation / listing folders etc, your link "/cmisatom/getRepositories?id=c9ad76c6-d121-4a32-bb14-e5d43bf91ee6" is not used.
The third link you're referring to looks like a URL template OBJECT_BY_ID - and here you have to provide the object id and populate other params before you make a request.
The param object id for the first request is again a value which you obtain from service document. This value is called ROOT FOLDER ID.
Use root folder id to update object by id url template and get the root folder details - from there you get the children and proceed further.
You can refer further to Apache Chemistry In Memory repository - https://chemistry.apache.org/java/developing/repositories/dev-repositories-inmemory.html - it is an open source implementation which can help you dig deep.
And this is the spec: http://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html

basic firebase URL structure?

I am building a very simple cron job backup system for a friend's firebase app;
I have PHP code, using firebase-php that can communicate with the firebase and the API docs state that adding the'?format=export" parameter will retrieve a .json file. Cool, so far.
My question is this: What path (after the firebase URL) is required?
The API doc appears to state that it should be /.json but it returns a 404 /json/ works on the simulator, but also returns a 404 in testing
(note: looking for a single text file, similar to the "Export json" data dashboard, if possible)
Thanks in advance.
The path defined the portion of the Firebase data tree that is being loaded. That means that you can load /any/possible/string and it will return a value, though that value is likely to be null unless you've written data to that path. Also note that without a defined extension (i.e. .json) you'll be attempting to load Firebase's in-browser graphical debugger.
In short, if you're using the REST API, you'll always want to end your paths in .json, but nothing else is required, i.e. https://<your-firebase>.firebaseio.com/.json is perfectly valid, and would download your entire Firebase. The format=export parameter ensures that any Firebase priority values are preserved in your JSON output, under the key .priority at any node, where they would normally be excluded.

Resources