Skip to content

REST - Using $select always returns the primary key fields and $orderby fields in the response #1505

@severussundar

Description

@severussundar

For the below GET request ,

GET https://localhost:5001/api/Book?$select=title

the response contains the id field as well.

Response:

{
    "value": [
        {
            "title": "New title #1",
            "id": 1
        },
        {
            "title": "Also Awesome book",
            "id": 2
        },
        {
            "title": "Great wall of china explained",
            "id": 3
        },
        ...
    ]
}

For the below GET request ,

GET https://localhost:5001/api/Book?$select=id,publisher_id&$orderby=name

the response contains the name field as well.

Response:

{
    "value": [
        {
            "id": 2,
            "publisher_id": 1234,
            "name": "Also Awesome book"
        },
       ...
       ]
}    

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrest

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions