Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have multiple organizational URI's that need to be called into a URL. I have a button opening a new page with list of "agents" who are from different organizational units.

Below I've called from unit 474 from the API.

public async Task<List<Agent>> GetAgents()
    {
        var result = await Helper.GetAsync<AgentSearchResult>($"{_propertyApiSettings.BaseUrl}beta/Staff?organisationalUnitUri=/OrganisationalUnit/474", config: await GetHeaders());
        return result.Result.Results;
    }


What do I need to add to include another organizational unit? For example 123.

What I have tried:

public async Task<List<Agent>> GetAgents()
    {
        var result = await Helper.GetAsync<AgentSearchResult>($"{_propertyApiSettings.BaseUrl}beta/Staff?organisationalUnitUri=/OrganisationalUnit/474&organisationalUnitUri=/OrganisationalUnit/123", config: await GetHeaders());
        return result.Result.Results;
    }
Posted
Updated 7-Jul-20 17:12pm

1 solution

You would have to consult the documentation for the API for this - we simply can't tell, because we don't know which API/System the end-point is on.

It should have a 'route'/method for querying multiple Organizantional units, or it might require that they be submitted as a JSON list in the payload
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900