Skip to content

api --field silently ignored on GET requests #162

@tiulpin

Description

@tiulpin

CLI Version: dev
TeamCity Server Version: 2026.2
Operating System: macOS

What happened?

tc api '/app/rest/server' -f 'key=value' silently ignores the --field flag on GET requests. The flag builds a JSON request body, which is meaningless for GET.

$ tc api '/app/rest/server' -f 'key=value'
{  ... normal server response ... }

Expected behavior

Should warn or error when --field is used with GET (the default method), e.g.:
Warning: --field is ignored for GET requests. Use -X POST to send a request body.

Steps to reproduce

  1. Run tc api '/app/rest/server' -f 'key=value'
  2. Observe no warning — the field is silently discarded

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions