Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TreeApi
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
apis
TreeApi
Commits
73825076
Commit
73825076
authored
4 years ago
by
Marcel Nellesen
Browse files
Options
Downloads
Patches
Plain Diff
Small changes (coscine/issues#1114)
parent
cf592864
Branches
Topic/1114-docuTreeApi
No related tags found
1 merge request
!7
New: Add documentation for treeAPI(coscine/issues#1114)
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Tree/Controllers/TreeController.cs
+5
-4
5 additions, 4 deletions
src/Tree/Controllers/TreeController.cs
src/Tree/Tree.csproj
+1
-1
1 addition, 1 deletion
src/Tree/Tree.csproj
with
6 additions
and
5 deletions
src/Tree/Controllers/TreeController.cs
+
5
−
4
View file @
73825076
...
...
@@ -66,6 +66,7 @@ namespace Coscine.Api.Tree.Controllers
_blobApiLink
=
$"https://
{
host
}{
path
}
/blob/"
;
_prefix
=
Program
.
Configuration
.
GetStringAndWait
(
"coscine/global/epic/prefix"
);
}
/// <summary>
/// Generates Id
/// </summary>
...
...
@@ -82,7 +83,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// <param name="resourceId"> Id of a resource</param>
/// <param name="path">Path to the file</param>
/// <returns> JS
on
Object if ok, otherwise Statuscode 400 or 401 or 404</returns>
/// <returns> JS
ON
Object
with the metadata
if ok, otherwise Statuscode 400 or 401 or 404</returns>
[
HttpGet
(
"[controller]/{resourceId}/{*path}"
)]
public
async
Task
<
IActionResult
>
GetMetadata
(
string
resourceId
,
string
path
)
{
...
...
@@ -136,7 +137,7 @@ namespace Coscine.Api.Tree.Controllers
var
jObject
=
new
JObject
(
new
JProperty
(
"data"
,
new
JObject
(
new
JProperty
(
"metadataStorage"
,
JToken
.
FromObject
(
graphs
)),
new
JProperty
(
"fileStorage"
,
JToken
.
FromObject
(
infos
.
Select
(
x
=>
new
ObjectMetaInfoReturnObject
(
x
,
_blobApiLink
,
resource
.
Id
.
ToString
()))))
new
JProperty
(
"fileStorage"
,
JToken
.
FromObject
(
infos
.
Select
(
x
=>
new
ObjectMetaInfoReturnObject
(
x
,
_blobApiLink
,
resource
.
Id
.
ToString
()))))
))
);
...
...
@@ -149,7 +150,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path">Path to the file</param>
/// <returns>
No content
, otherwise Statuscode 400 or 401
or 204
</returns>
/// <returns>
If ok Statuscode 204
, otherwise Statuscode 400 or 401</returns>
[
HttpPut
(
"[controller]/{resourceId}/{*path}"
)]
public
IActionResult
StoreMetadataForFile
(
string
resourceId
,
string
path
)
{
...
...
@@ -316,7 +317,7 @@ namespace Coscine.Api.Tree.Controllers
/// Gets the name of the resource type
/// </summary>
/// <param name="resource">Resource</param>
/// <returns>
Rds
</returns>
/// <returns>
Processed name of the resource
</returns>
private
string
GetResourceTypeName
(
Resource
resource
)
{
if
(
resource
.
Type
.
DisplayName
.
ToLower
().
Equals
(
"s3"
))
...
...
This diff is collapsed.
Click to expand it.
src/Tree/Tree.csproj
+
1
−
1
View file @
73825076
...
...
@@ -43,7 +43,7 @@
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<DocumentationFile>
bin\
Debug
\Coscine.Api.Tree.xml
</DocumentationFile>
<DocumentationFile>
bin\
Release
\Coscine.Api.Tree.xml
</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"Consul, Version=0.7.2.6, Culture=neutral, PublicKeyToken=20a6ad9a81df1d95, processorArchitecture=MSIL"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment