GetFileInfo
Returns information on a file using fileId.
Service | Operation |
---|---|
groupFile | GET_FILE_INFO |
Method Parameters
Parameter | Description |
---|---|
groupId | The id of the group. |
fileId | The id of the file. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string groupId = "dfsfsffsd";
string fileId = "guid";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.GroupFileService.GetFileInfo(groupId, fileId, successCallback, failureCallback);
const char *groupId = "dfsfsffsd";
const char *fileId = "guid";
_bc->getGroupFileService()->getFileInfo(groupId, fileId, this);
NSString *groupId = @"dfsfsffsd";
NSString *fileId = @"guid";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc groupFileService] getFileInfo:groupId
fileId:fileId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String groupId = "dfsfsffsd";
String fileId = "guid";
this; // implements IServerCallback
_bc.getGroupFileService().getFileInfo(groupId, fileId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var groupId = "dfsfsffsd";
var fileId = "guid";
_bc.groupFile.getFileInfo(groupId, fileId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var groupId = "dfsfsffsd";
var fileId = "guid";
ServerResponse result = await _bc.groupFileService.getFileInfo(groupId:groupId, fileId:fileId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var groupId = "dfsfsffsd";
var fileId = "guid";
var groupFileProxy = bridge.getGroupFileServiceProxy();
var postResult = groupFileProxy.getFileInfo(groupId, fileId);
if (postResult.status == 200) {
// Success!
}
{
"service": "groupFile",
"operation": "GET_FILE_INFO",
"data":
{
"groupId": "dfsfsffsd",
"fileId": "guid"
}
}
JSON Response
{
"data": {
"fileDetails": {
"treeId": "d9e937cc-750f-4414-962c-838f1af3f34a",
"fileName": "glog.json",
"fileSize": 7051,
"dateUploaded": 1677183768000,
"etag": "08c580b36ee79773bfec4a3c51bd1b64",
"acl": {
"member": 2,
"other": 0
},
"version": 1,
"url": "https://api.internal.braincloudservers.com/groupfiles/bc/g/23782/gr/2bf538d1-19ea-4e14-9862-f979215e09b7/d9e937cc-750f-4414-962c-838f1af3f34a/6d938c22-3b8c-4b99-a913-2edafed71a83/V1/glog.json",
"fileId": "6d938c22-3b8c-4b99-a913-2edafed71a83"
},
"groupId": "2bf538d1-19ea-4e14-9862-f979215e09b7"
},
"status": 200
}