fix: route web api parameters through path
This commit is contained in:
@@ -94,25 +94,25 @@ namespace C4IT.F4SD
|
|||||||
return GetRequiredService<IJournalService>();
|
return GetRequiredService<IJournalService>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("getDirectLinkCreateTicket"), HttpGet]
|
[Route("getDirectLinkCreateTicket/{sid}/{assetname}"), HttpGet]
|
||||||
public async Task<F4SDHelperService.DirectLink> getDirectLinkCreateTicket([FromUri] string sid = "", [FromUri] string assetname = "")
|
public async Task<F4SDHelperService.DirectLink> getDirectLinkCreateTicket(string sid = "", string assetname = "")
|
||||||
{
|
{
|
||||||
await Task.Delay(0);
|
await Task.Delay(0);
|
||||||
return await _f4stHelperService.getDirectLinkCreateTicket(sid, assetname)
|
return await _f4stHelperService.getDirectLinkCreateTicket(sid, assetname)
|
||||||
?? new F4SDHelperService.DirectLink();
|
?? new F4SDHelperService.DirectLink();
|
||||||
}
|
}
|
||||||
[Route("getDirectLinkF4SD"), HttpGet]
|
[Route("getDirectLinkF4SD/{eoid}/{type}"), HttpGet]
|
||||||
public async Task<string> getDirectLinkF4SD([FromUri] Guid eoid, [FromUri] string type)
|
public async Task<string> getDirectLinkF4SD(Guid eoid, string type)
|
||||||
{
|
{
|
||||||
return await _f4stHelperService.getDirectLinkF4SD(eoid, type) ?? string.Empty;
|
return await _f4stHelperService.getDirectLinkF4SD(eoid, type) ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("getTicketList"), HttpGet]
|
[Route("getTicketList/{sid}/{hours}/{queueoption}/{queues}"), HttpGet]
|
||||||
public async Task<List<cF4SDTicketSummary>> getTicketList(
|
public async Task<List<cF4SDTicketSummary>> getTicketList(
|
||||||
[FromUri] string sid,
|
string sid,
|
||||||
[FromUri] int hours,
|
int hours,
|
||||||
[FromUri] int queueoption = 0,
|
int queueoption = 0,
|
||||||
[FromUri] string queues = ""
|
string queues = ""
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var decodedPairs = ParseQueues(queues);
|
var decodedPairs = ParseQueues(queues);
|
||||||
@@ -128,7 +128,7 @@ namespace C4IT.F4SD
|
|||||||
|
|
||||||
|
|
||||||
[Route("getTicketDetails"), HttpGet]
|
[Route("getTicketDetails"), HttpGet]
|
||||||
public async Task<cF4SDTicket> getTicketDetails([FromUri] Guid objectId)
|
public async Task<cF4SDTicket> getTicketDetails(Guid objectId)
|
||||||
{
|
{
|
||||||
var tickets = await _f4stHelperService.getTicketDetails(new List<Guid>() { objectId });
|
var tickets = await _f4stHelperService.getTicketDetails(new List<Guid>() { objectId });
|
||||||
if (tickets?.Count > 0)
|
if (tickets?.Count > 0)
|
||||||
@@ -138,18 +138,18 @@ namespace C4IT.F4SD
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Route("getTicketHistory"), HttpGet]
|
[Route("getTicketHistory"), HttpGet]
|
||||||
public async Task<List<cTicketJournalItem>> getTicketHistory([FromUri] Guid objectId)
|
public async Task<List<cTicketJournalItem>> getTicketHistory(Guid objectId)
|
||||||
{
|
{
|
||||||
return await _f4stHelperService.GetJournalEntries(objectId) ?? new List<cTicketJournalItem>();
|
return await _f4stHelperService.GetJournalEntries(objectId) ?? new List<cTicketJournalItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("getTicketOverviewCounts"), HttpGet]
|
[Route("getTicketOverviewCounts"), HttpGet]
|
||||||
public async Task<F4SDHelperService.TicketOverviewCountsResult> getTicketOverviewCounts(
|
public async Task<F4SDHelperService.TicketOverviewCountsResult> getTicketOverviewCounts(
|
||||||
[FromUri] string sid,
|
string sid,
|
||||||
[FromUri] string scope = "personal",
|
string scope = "personal",
|
||||||
[FromUri] string keys = "",
|
string keys = "",
|
||||||
[FromUri] int queueoption = 0,
|
int queueoption = 0,
|
||||||
[FromUri] string queues = ""
|
string queues = ""
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var parsedKeys = (keys ?? string.Empty)
|
var parsedKeys = (keys ?? string.Empty)
|
||||||
@@ -189,12 +189,12 @@ namespace C4IT.F4SD
|
|||||||
|
|
||||||
[Route("getTicketOverviewRelations"), HttpGet]
|
[Route("getTicketOverviewRelations"), HttpGet]
|
||||||
public async Task<List<F4SDHelperService.TicketOverviewRelationDto>> getTicketOverviewRelations(
|
public async Task<List<F4SDHelperService.TicketOverviewRelationDto>> getTicketOverviewRelations(
|
||||||
[FromUri] string sid,
|
string sid,
|
||||||
[FromUri] string scope = "personal",
|
string scope = "personal",
|
||||||
[FromUri] string key = "",
|
string key = "",
|
||||||
[FromUri] int count = 0,
|
int count = 0,
|
||||||
[FromUri] int queueoption = 0,
|
int queueoption = 0,
|
||||||
[FromUri] string queues = ""
|
string queues = ""
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var decodedQueues = ParseQueues(queues);
|
var decodedQueues = ParseQueues(queues);
|
||||||
@@ -213,7 +213,7 @@ namespace C4IT.F4SD
|
|||||||
*/
|
*/
|
||||||
[Route("getPickup/{name}"), HttpGet]
|
[Route("getPickup/{name}"), HttpGet]
|
||||||
//[CacheOutput(UseETAG = true)]
|
//[CacheOutput(UseETAG = true)]
|
||||||
public async Task<EntityEnumeration> getPickup([FromUri] string name, [FromUri] EntityEnumerationVisibilityMode mode = EntityEnumerationVisibilityMode.None, [FromUri] Int32 group = -1)
|
public async Task<EntityEnumeration> getPickup(string name, EntityEnumerationVisibilityMode mode = EntityEnumerationVisibilityMode.None, Int32 group = -1)
|
||||||
{
|
{
|
||||||
await Task.Delay(0);
|
await Task.Delay(0);
|
||||||
EntityEnumeration enumerationTemp = GetEnumeration(name, mode);
|
EntityEnumeration enumerationTemp = GetEnumeration(name, mode);
|
||||||
@@ -251,7 +251,7 @@ namespace C4IT.F4SD
|
|||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("getRoleMemberships")]
|
[Route("getRoleMemberships")]
|
||||||
public async Task<object> getRoleMemberships([FromUri] string sid = "", [FromUri] string upn = "", [FromUri] Guid? id = null)
|
public async Task<object> getRoleMemberships(string sid = "", string upn = "", Guid? id = null)
|
||||||
{
|
{
|
||||||
var filter = "";
|
var filter = "";
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ namespace C4IT.F4SD
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Route("loglevel"), HttpGet]
|
[Route("loglevel"), HttpGet]
|
||||||
public async Task<string> setDebugMode([FromUri] string debug = "0")
|
public async Task<string> setDebugMode(string debug = "0")
|
||||||
{
|
{
|
||||||
var CM = MethodBase.GetCurrentMethod();
|
var CM = MethodBase.GetCurrentMethod();
|
||||||
LogMethodBegin(CM);
|
LogMethodBegin(CM);
|
||||||
@@ -424,7 +424,7 @@ namespace C4IT.F4SD
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Route("log"), HttpGet]
|
[Route("log"), HttpGet]
|
||||||
public IHttpActionResult getLog([FromUri] string download = "0", [FromUri] int count = 50, [FromUri] string filter = "")
|
public IHttpActionResult getLog(string download = "0", int count = 50, string filter = "")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<ID>b3193051-6fe6-cdd2-7d76-08da9bbec2b6</ID>
|
<ID>b3193051-6fe6-cdd2-7d76-08da9bbec2b6</ID>
|
||||||
<RequestContract>{"UsedTypes":{"RequestContract":{"Descriptor":{"sid":{"Type":"StringType"},"assetname":{"Type":"StringType"}}}},"ContractDescriptor":{"ReferenceTo":null,"ReferenceFilter":null,"Required":false,"Obsolete":false,"MaxLength":0,"ResourceKey":null,"Documentation":null,"Title":null,"Paths":null,"Type":"RequestContract"}}</RequestContract>
|
<RequestContract>{"UsedTypes":{"RequestContract":{"Descriptor":{"sid":{"Type":"StringType"},"assetname":{"Type":"StringType"}}}},"ContractDescriptor":{"ReferenceTo":null,"ReferenceFilter":null,"Required":false,"Obsolete":false,"MaxLength":0,"ResourceKey":null,"Documentation":null,"Title":null,"Paths":null,"Type":"RequestContract"}}</RequestContract>
|
||||||
<Name>getDirectLinkCreateTicket(sid, assetname)</Name>
|
<Name>getDirectLinkCreateTicket(sid, assetname)</Name>
|
||||||
<RouteTemplate>getDirectLinkCreateTicket</RouteTemplate>
|
<RouteTemplate>getDirectLinkCreateTicket/{sid}/{assetname}</RouteTemplate>
|
||||||
<Documentation />
|
<Documentation />
|
||||||
<TypeID>7660e907-769c-e711-a182-f079595b3ec7</TypeID>
|
<TypeID>7660e907-769c-e711-a182-f079595b3ec7</TypeID>
|
||||||
<Service>dcd66369-4933-ed11-1b9c-e3e293f5401c</Service>
|
<Service>dcd66369-4933-ed11-1b9c-e3e293f5401c</Service>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<ID>04d0755f-27dd-c4ac-2785-08dac1666661</ID>
|
<ID>04d0755f-27dd-c4ac-2785-08dac1666661</ID>
|
||||||
<RequestContract>{"UsedTypes":{"RequestContract":{"Descriptor":{"eoid":{"Type":"StringType"},"type":{"Type":"StringType"}}}},"ContractDescriptor":{"ReferenceTo":null,"ReferenceFilter":null,"Required":false,"Obsolete":false,"MaxLength":0,"ResourceKey":null,"Documentation":null,"Title":null,"Paths":null,"Type":"RequestContract"}}</RequestContract>
|
<RequestContract>{"UsedTypes":{"RequestContract":{"Descriptor":{"eoid":{"Type":"StringType"},"type":{"Type":"StringType"}}}},"ContractDescriptor":{"ReferenceTo":null,"ReferenceFilter":null,"Required":false,"Obsolete":false,"MaxLength":0,"ResourceKey":null,"Documentation":null,"Title":null,"Paths":null,"Type":"RequestContract"}}</RequestContract>
|
||||||
<Name>getDirectLinkF4SD(eoid, type)</Name>
|
<Name>getDirectLinkF4SD(eoid, type)</Name>
|
||||||
<RouteTemplate>getDirectLinkF4SD</RouteTemplate>
|
<RouteTemplate>getDirectLinkF4SD/{eoid}/{type}</RouteTemplate>
|
||||||
<Documentation />
|
<Documentation />
|
||||||
<TypeID>7660e907-769c-e711-a182-f079595b3ec7</TypeID>
|
<TypeID>7660e907-769c-e711-a182-f079595b3ec7</TypeID>
|
||||||
<Service>dcd66369-4933-ed11-1b9c-e3e293f5401c</Service>
|
<Service>dcd66369-4933-ed11-1b9c-e3e293f5401c</Service>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<ID>163e04c2-8b5c-c0e6-0535-08da9bbec2df</ID>
|
<ID>163e04c2-8b5c-c0e6-0535-08da9bbec2df</ID>
|
||||||
<RequestContract>{"UsedTypes":{"RequestContract":{"Descriptor":{"sid":{"Type":"StringType"},"hours":{"Type":"StringType"},"queueoption":{"Type":"StringType"},"queues":{"Type":"StringType"}}}},"ContractDescriptor":{"ReferenceTo":null,"ReferenceFilter":null,"Required":false,"Obsolete":false,"MaxLength":0,"ResourceKey":null,"Documentation":null,"Title":null,"Paths":null,"Type":"RequestContract"}}</RequestContract>
|
<RequestContract>{"UsedTypes":{"RequestContract":{"Descriptor":{"sid":{"Type":"StringType"},"hours":{"Type":"StringType"},"queueoption":{"Type":"StringType"},"queues":{"Type":"StringType"}}}},"ContractDescriptor":{"ReferenceTo":null,"ReferenceFilter":null,"Required":false,"Obsolete":false,"MaxLength":0,"ResourceKey":null,"Documentation":null,"Title":null,"Paths":null,"Type":"RequestContract"}}</RequestContract>
|
||||||
<Name>getTicketList(sid, hours, queueoption, queues)</Name>
|
<Name>getTicketList(sid, hours, queueoption, queues)</Name>
|
||||||
<RouteTemplate>getTicketList</RouteTemplate>
|
<RouteTemplate>getTicketList/{sid}/{hours}/{queueoption}/{queues}</RouteTemplate>
|
||||||
<Documentation />
|
<Documentation />
|
||||||
<TypeID>7660e907-769c-e711-a182-f079595b3ec7</TypeID>
|
<TypeID>7660e907-769c-e711-a182-f079595b3ec7</TypeID>
|
||||||
<Service>dcd66369-4933-ed11-1b9c-e3e293f5401c</Service>
|
<Service>dcd66369-4933-ed11-1b9c-e3e293f5401c</Service>
|
||||||
|
|||||||
@@ -363,32 +363,18 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/c4itf4sdwebapi/getTicketList?sid={{sid}}&hours={{hours}}&queueoption={{queueOption}}&queues={{queues}}",
|
"raw": "{{baseUrl}}/api/c4itf4sdwebapi/getTicketList/{{sid}}/{{hours}}/{{queueOption}}/{{queues}}",
|
||||||
"host": [
|
"host": [
|
||||||
"{{baseUrl}}"
|
"{{baseUrl}}"
|
||||||
],
|
],
|
||||||
"path": [
|
"path": [
|
||||||
"api",
|
"api",
|
||||||
"c4itf4sdwebapi",
|
"c4itf4sdwebapi",
|
||||||
"getTicketList"
|
"getTicketList",
|
||||||
],
|
"{{sid}}",
|
||||||
"query": [
|
"{{hours}}",
|
||||||
{
|
"{{queueOption}}",
|
||||||
"key": "sid",
|
"{{queues}}"
|
||||||
"value": "{{sid}}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "hours",
|
|
||||||
"value": "{{hours}}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "queueoption",
|
|
||||||
"value": "{{queueOption}}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "queues",
|
|
||||||
"value": "{{queues}}"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -462,24 +448,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/c4itf4sdwebapi/getDirectLinkCreateTicket?sid={{sid}}&assetname={{assetName}}",
|
"raw": "{{baseUrl}}/api/c4itf4sdwebapi/getDirectLinkCreateTicket/{{sid}}/{{assetName}}",
|
||||||
"host": [
|
"host": [
|
||||||
"{{baseUrl}}"
|
"{{baseUrl}}"
|
||||||
],
|
],
|
||||||
"path": [
|
"path": [
|
||||||
"api",
|
"api",
|
||||||
"c4itf4sdwebapi",
|
"c4itf4sdwebapi",
|
||||||
"getDirectLinkCreateTicket"
|
"getDirectLinkCreateTicket",
|
||||||
],
|
"{{sid}}",
|
||||||
"query": [
|
"{{assetName}}"
|
||||||
{
|
|
||||||
"key": "sid",
|
|
||||||
"value": "{{sid}}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "assetname",
|
|
||||||
"value": "{{assetName}}"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -495,24 +473,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/c4itf4sdwebapi/getDirectLinkF4SD?eoid={{eoid}}&type={{type}}",
|
"raw": "{{baseUrl}}/api/c4itf4sdwebapi/getDirectLinkF4SD/{{eoid}}/{{type}}",
|
||||||
"host": [
|
"host": [
|
||||||
"{{baseUrl}}"
|
"{{baseUrl}}"
|
||||||
],
|
],
|
||||||
"path": [
|
"path": [
|
||||||
"api",
|
"api",
|
||||||
"c4itf4sdwebapi",
|
"c4itf4sdwebapi",
|
||||||
"getDirectLinkF4SD"
|
"getDirectLinkF4SD",
|
||||||
],
|
"{{eoid}}",
|
||||||
"query": [
|
"{{type}}"
|
||||||
{
|
|
||||||
"key": "eoid",
|
|
||||||
"value": "{{eoid}}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "type",
|
|
||||||
"value": "{{type}}"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user