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
GitLab 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
cf592864
Commit
cf592864
authored
4 years ago
by
Theresia Rupprecht
Browse files
Options
Downloads
Patches
Plain Diff
New: Add documentation for treeAPI(cosine/issues#1114)
parent
45321af9
No related branches found
No related tags found
1 merge request
!7
New: Add documentation for treeAPI(coscine/issues#1114)
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Tree/Controllers/TreeController.cs
+4
-4
4 additions, 4 deletions
src/Tree/Controllers/TreeController.cs
with
4 additions
and
4 deletions
src/Tree/Controllers/TreeController.cs
+
4
−
4
View file @
cf592864
...
@@ -71,7 +71,7 @@ namespace Coscine.Api.Tree.Controllers
...
@@ -71,7 +71,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// </summary>
/// <param name="resourceId">Id of the resource</param>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path"> Path to file</param>
/// <param name="path"> Path to file</param>
/// <returns></returns>
/// <returns>
Uri
</returns>
public
Uri
GenerateId
(
string
resourceId
,
string
path
)
public
Uri
GenerateId
(
string
resourceId
,
string
path
)
{
{
return
new
Uri
(
$"https://hdl.handle.net/
{
_prefix
}
/
{
resourceId
}
@path=
{
Uri
.
EscapeDataString
(
path
)}
"
);
return
new
Uri
(
$"https://hdl.handle.net/
{
_prefix
}
/
{
resourceId
}
@path=
{
Uri
.
EscapeDataString
(
path
)}
"
);
...
@@ -82,7 +82,7 @@ namespace Coscine.Api.Tree.Controllers
...
@@ -82,7 +82,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// </summary>
/// <param name="resourceId"> Id of a resource</param>
/// <param name="resourceId"> Id of a resource</param>
/// <param name="path">Path to the file</param>
/// <param name="path">Path to the file</param>
/// <returns> JSon Object if ok, otherwise
error
</returns>
/// <returns> JSon Object if ok, otherwise
Statuscode 400 or 401 or 404
</returns>
[
HttpGet
(
"[controller]/{resourceId}/{*path}"
)]
[
HttpGet
(
"[controller]/{resourceId}/{*path}"
)]
public
async
Task
<
IActionResult
>
GetMetadata
(
string
resourceId
,
string
path
)
public
async
Task
<
IActionResult
>
GetMetadata
(
string
resourceId
,
string
path
)
{
{
...
@@ -149,7 +149,7 @@ namespace Coscine.Api.Tree.Controllers
...
@@ -149,7 +149,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// </summary>
/// <param name="resourceId">Id of the resource</param>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path">Path to the file</param>
/// <param name="path">Path to the file</param>
/// <returns>No content, otherwise
error
</returns>
/// <returns>No content, otherwise
Statuscode 400 or 401 or 204
</returns>
[
HttpPut
(
"[controller]/{resourceId}/{*path}"
)]
[
HttpPut
(
"[controller]/{resourceId}/{*path}"
)]
public
IActionResult
StoreMetadataForFile
(
string
resourceId
,
string
path
)
public
IActionResult
StoreMetadataForFile
(
string
resourceId
,
string
path
)
{
{
...
@@ -269,7 +269,7 @@ namespace Coscine.Api.Tree.Controllers
...
@@ -269,7 +269,7 @@ namespace Coscine.Api.Tree.Controllers
/// <param name="resourceId">Id of the resource</param>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path">Path to the file</param>
/// <param name="path">Path to the file</param>
/// <param name="resource">Resource</param>
/// <param name="resource">Resource</param>
/// <returns>null, otherwise
error
</returns>
/// <returns>null, otherwise
Statuscode 400 or 404
</returns>
private
IActionResult
CheckResourceIdAndPath
(
string
resourceId
,
string
path
,
out
Resource
resource
)
private
IActionResult
CheckResourceIdAndPath
(
string
resourceId
,
string
path
,
out
Resource
resource
)
{
{
resource
=
null
;
resource
=
null
;
...
...
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