Fields Syntax
In YouTrack REST API, when you send an HTTP request to a resource, by default, the server sends back only the ID of the resource entity. To receive an attribute in the response from server, you must specify it explicitly in the fields
parameter of a request.
Let's see how it works on a sample request for the current user account.
Samples
Request without Fields Parameter
Here we use a default request without providing the fields
parameter.
Request
Response body
In response, the server sends the entity ID:
Request with Fields Parameter
Here we use the fields
request parameter to specify explicitly which attributes of the entity should be returned in the response body: id
, login
, name
, and email
of the current user.
Request
Response body
In response, the server sends the requested attributes: