Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Get division by name

    Posted 06-05-2025 18:26

    Irina | 2023-07-06 08:51:35 UTC | #1

    Hello,

    I'm trying to receive division id by name using the GC API. In our organization we have divisions test, test1, test2.

    The following request returns all three divisions:

    GET /api/v2/authorization/divisions?name=test

    How should I modify it to receive only exact match (division "test")?

    Thanks, Irina


    charlie.conneely | 2023-07-06 12:10:05 UTC | #2

    Hi Irina

    Unfortunately there is no query parameter to specify an exact match, but if you are looking for "test" out of those three names, it will be the first item in the returned entities array, especially if you specify ?sortBy=name.

    And of course, depending on how you are interacting with the API (via an sdk, etc.), you could loop through the returned data to perform an exact string comparison yourself.

    Hope this helps Charlie


    Irina | 2023-07-06 12:26:34 UTC | #3

    Thank you, Charlie!


    system | 2023-08-06 12:27:30 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 20864