MicrosoftDocs / vsts-rest-api-specs

MIT License
158 stars 114 forks source link

Improve Documentation #670

Open vinijmoura opened 3 months ago

vinijmoura commented 3 months ago

[Enter feedback here]


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

At the image below, please include on table at:

Name Type Description
searchText string The search text. If you need to concatenate keywords, use Functional code search. Example: "searchText": "mySearch ext:yml"
image
YousefImran commented 3 months ago

Apologies if this is the wrong place, but for the life of me I cannot find the JSON schema for Azure DevOps REST API requests. The documentation includes one sample that is not comprehensive. Mainly, I would like to learn the format of filters to use in the request body to customize my search (such as excluding certain paths).

vinijmoura commented 3 months ago

on body, use keywords file: , ext: , class: etc. on searchText parameter separated by space!

Example:

{ "searchText": "mysearch file:azure-pipelines ext:yml", "$top": 1000,
"filters": { "Project": [ "MyProject" ] } }

YousefImran commented 3 months ago

Thank you! That works.

Yousef

On Tue, Mar 12, 2024, 2:13 PM Vinicius Moura @.***> wrote:

on body, use keywords file: , ext: , class: etc. on searchText parameter separated by space!

Example:

{ "searchText": "mysearch file:azure-pipelines ext:yml", "$top": 1000, "filters": { "Project": [ "MyProject" ] } }

— Reply to this email directly, view it on GitHub https://github.com/MicrosoftDocs/vsts-rest-api-specs/issues/670#issuecomment-1992271051, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYNBL5HBJF5HU3Y5ZZYVRDYX5ATHAVCNFSM6AAAAABEHP5AYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJSGI3TCMBVGE . You are receiving this because you commented.Message ID: @.***>

YousefImran commented 3 months ago

on body, use keywords file: , ext: , class: etc. on searchText parameter separated by space!

Example:

{ "searchText": "mysearch file:azure-pipelines ext:yml", "$top": 1000, "filters": { "Project": [ "MyProject" ] } }

Unfortunately, I have a lot more questions and I would like to be independent if possible. For example, what query parameters are supported by the endpoint? (I would like to filter some properties out. For example, return only fileName and path). Which parameters are required (I had to discover this by trial and error and to find out the response is limited to 2000 rows/objects with $skip = 1000 and $top = 1000 (as upper ranges)). Is there an endpoint documentation somewhere? Can I discover it in Azure DevOps CLI? Etc. Thanks ahead.

vinijmoura commented 3 months ago

on body, use keywords file: , ext: , class: etc. on searchText parameter separated by space! Example: { "searchText": "mysearch file:azure-pipelines ext:yml", "$top": 1000, "filters": { "Project": [ "MyProject" ] } }

Unfortunately, I have a lot more questions and I would like to be independent if possible. For example, what query parameters are supported by the endpoint? (I would like to filter some properties out. For example, return only fileName and path). Which parameters are required (I had to discover this by trial and error and to find out the response is limited to 2000 rows/objects with $skip = 1000 and $top = 1000 (as upper ranges)). Is there an endpoint documentation somewhere? Can I discover it in Azure DevOps CLI? Etc. Thanks ahead.

I agree. The documentation is not clear!