Share via


Package Search Results - Fetch Package Search Results

検索テキストの結果のセットを提供します。

POST https://almsearch.dev.azure.com/{organization}/_apis/search/packagesearchresults?api-version=7.1-preview.1

URI パラメーター

名前 / 必須 説明
organization
path True

string

Azure DevOps 組織の名前です。

api-version
query True

string

使う API のバージョン。 このバージョンの API を使用するには、これを '7.1-preview.1' に設定する必要があります。

要求本文

名前 説明
$orderBy

SortOption[]

検索結果を並べ替えるためのオプション。 null に設定すると、結果は関連性で並べ替えて返されます。 複数の並べ替えオプションが指定されている場合、結果は OrderBy で指定された順序で並べ替えられます。

$skip

integer

スキップする結果の数。

$top

integer

返される結果の数。

filters

object

適用するフィルター。 適用するフィルターがない場合は、null に設定します。

includeFacets

boolean

結果のファセットを選択するフラグ。 既定の動作は false です。

searchText

string

検索文字列。

応答

名前 説明
200 OK

PackageSearchResponseContent

正常な操作

Headers

ActivityId: string

セキュリティ

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

名前 説明
vso.packaging フィードとパッケージを読み取る機能を付与します。 また、パッケージを検索する機能も付与されます。

Sample Request

POST https://almsearch.dev.azure.com/{organization}/_apis/search/packagesearchresults?api-version=7.1-preview.1

{
  "$skip": 0,
  "$top": 50,
  "$orderBy": null,
  "includeFacets": true,
  "searchText": "microsoft applicationinsight package",
  "filters": {
    "Feeds": [
      "ApplicationInsights-Team"
    ],
    "View": [
      "local"
    ],
    "ProtocolType": [
      "Nuget",
      "Npm"
    ]
  }
}

Sample Response

{
  "count": 3,
  "results": [
    {
      "name": "@microsoft/applicationinsights-mezzurite",
      "id": "0adc5b40-8b48-4a42-ac5e-93da78206d27",
      "description": "Logging Extention for Mezzurtie Timing Package",
      "protocolType": "Npm",
      "feeds": [
        {
          "collectionId": "0efb4611-d565-4cd1-9a64-7d6cb6d7d5f0",
          "collectionName": "mseng",
          "feedId": "cd3f7228-b239-4ef5-8d3b-ee9c3bc79bc2",
          "feedName": "ApplicationInsights-Team",
          "packageUrl": "https://dev.azure.com/mseng/_packaging?feed=ApplicationInsights-Team&_a=package&package=@microsoft/applicationinsights-mezzurite&version=1.0.0&protocolType=Npm",
          "latestVersion": "1.0.0",
          "latestMatchedVersion": "1.0.0",
          "views": [
            "local"
          ]
        }
      ],
      "hits": [
        {
          "fieldReferenceName": "name",
          "highlights": [
            "@<highlighthit>microsoft</highlighthit>/<highlighthit>applicationinsights</highlighthit>-mezzurite"
          ]
        },
        {
          "fieldReferenceName": "description",
          "highlights": [
            "Logging Extention for Mezzurtie Timing <highlighthit>Package</highlighthit>"
          ]
        }
      ]
    },
    {
      "name": "Microsoft.ApplicationInsights.Masi.Tracing",
      "id": "5b709505-a14f-4d2c-b172-21f1e6fc0562",
      "description": "The MASI tracing package allowing you to send log messages with activity context to Application Insights and to Windows Azure Diagnostics easily",
      "protocolType": "NuGet",
      "feeds": [
        {
          "collectionId": "0efb4611-d565-4cd1-9a64-7d6cb6d7d5f0",
          "collectionName": "mseng",
          "feedId": "cd3f7228-b239-4ef5-8d3b-ee9c3bc79bc2",
          "feedName": "ApplicationInsights-Team",
          "packageUrl": "https://dev.azure.com/mseng/_packaging?feed=ApplicationInsights-Team&_a=package&package=Microsoft.ApplicationInsights.Masi.Tracing&version=1.0.13.2-build00132-2&protocolType=NuGet",
          "latestVersion": "1.0.13.2-build00132-2",
          "latestMatchedVersion": "1.0.13.2-build00132-2",
          "views": [
            "local"
          ]
        }
      ],
      "hits": [
        {
          "fieldReferenceName": "name",
          "highlights": [
            "<highlighthit>Microsoft</highlighthit>.<highlighthit>ApplicationInsights</highlighthit>.Masi.Tracing"
          ]
        },
        {
          "fieldReferenceName": "description",
          "highlights": [
            "The MASI tracing <highlighthit>package</highlighthit> allowing you to send log messages with activity context to Application"
          ]
        }
      ]
    },
    {
      "name": "Microsoft.ApplicationInsights.Agent.StartupTask",
      "id": "60c357c1-69bf-4c9b-8fe0-a8ad7e50a5f9",
      "description": "Application Insights Agent startup task. This package adds a startup task for installing Application Insights Agent to enable additional Application Insights Telemetry.",
      "protocolType": "NuGet",
      "feeds": [
        {
          "collectionId": "0efb4611-d565-4cd1-9a64-7d6cb6d7d5f0",
          "collectionName": "mseng",
          "feedId": "cd3f7228-b239-4ef5-8d3b-ee9c3bc79bc2",
          "feedName": "ApplicationInsights-Team",
          "packageUrl": "https://dev.azure.com/mseng/_packaging?feed=ApplicationInsights-Team&_a=package&package=Microsoft.ApplicationInsights.Agent.StartupTask&version=1.0.5&protocolType=NuGet",
          "latestVersion": "1.0.5",
          "latestMatchedVersion": "1.0.5",
          "views": [
            "local"
          ]
        }
      ],
      "hits": [
        {
          "fieldReferenceName": "name",
          "highlights": [
            "<highlighthit>Microsoft</highlighthit>.<highlighthit>ApplicationInsights</highlighthit>.Agent.StartupTask"
          ]
        },
        {
          "fieldReferenceName": "description",
          "highlights": [
            "This <highlighthit>package</highlighthit> adds a startup task for installing Application Insights Agent to enable additional"
          ]
        }
      ]
    }
  ],
  "infoCode": 0,
  "facets": {
    "ProtocolType": [
      {
        "name": "Npm",
        "id": "Npm",
        "resultCount": 1
      },
      {
        "name": "NuGet",
        "id": "NuGet",
        "resultCount": 2
      }
    ],
    "Feeds": [
      {
        "name": "ApexPreRelease",
        "id": "ApexPreRelease",
        "resultCount": 4
      },
      {
        "name": "ApplicationInsights-dotnet-develop",
        "id": "ApplicationInsights-dotnet-develop",
        "resultCount": 3
      },
      {
        "name": "ApplicationInsights-Team",
        "id": "ApplicationInsights-Team",
        "resultCount": 3
      },
      {
        "name": "ArtifactTool",
        "id": "ArtifactTool",
        "resultCount": 1
      },
      {
        "name": "Axon.Dependencies",
        "id": "Axon.Dependencies",
        "resultCount": 4
      },
      {
        "name": "CloudBuild",
        "id": "CloudBuild",
        "resultCount": 1
      },
      {
        "name": "CloudBuildTest",
        "id": "CloudBuildTest",
        "resultCount": 1
      },
      {
        "name": "CodeFlow",
        "id": "CodeFlow",
        "resultCount": 3
      },
      {
        "name": "Codex-Deps",
        "id": "Codex-Deps",
        "resultCount": 4
      },
      {
        "name": "Kusto-Internal",
        "id": "Kusto-Internal",
        "resultCount": 4
      },
      {
        "name": "MSCredProvider",
        "id": "MSCredProvider",
        "resultCount": 2
      },
      {
        "name": "VS",
        "id": "VS",
        "resultCount": 7
      },
      {
        "name": "VsoMicrosoftExternals",
        "id": "VsoMicrosoftExternals",
        "resultCount": 3
      }
    ],
    "View": [
      {
        "name": "Local",
        "id": "Local",
        "resultCount": 3
      }
    ]
  }
}

定義

名前 説明
FeedInfo

フィードの詳細を定義します。

PackageHit

パッケージの結果のフィールドで一致する用語を定義します。

PackageResult

パッケージ検索要求に一致したパッケージの結果を定義します。

PackageSearchRequest

パッケージ検索要求を定義します。

PackageSearchResponseContent

パッケージ検索要求に対して返される応答項目を定義します。

SortOption

結果を並べ替える方法を定義します。

FeedInfo

フィードの詳細を定義します。

名前 説明
collectionId

string

コレクションの ID。

collectionName

string

コレクションの名前。

feedId

string

フィードの ID。

feedName

string

フィードの名前。

latestMatchedVersion

string

このフィード内のパッケージの最新の一致バージョン。

latestVersion

string

このフィードのパッケージの最新バージョン。

packageUrl

string

このフィード内のパッケージの URL。

views

string[]

一致したパッケージを含むビューの一覧。

PackageHit

パッケージの結果のフィールドで一致する用語を定義します。

名前 説明
fieldReferenceName

string

強調表示されているフィールドの参照名。

highlights

string[]

フィールドの一致/強調表示されたスニペット。

PackageResult

パッケージ検索要求に一致したパッケージの結果を定義します。

名前 説明
description

string

パッケージの説明。

feeds

FeedInfo[]

一致するパッケージを含むフィードの一覧。

hits

PackageHit[]

一致する強調表示されたフィールドの一覧。

id

string

パッケージの ID。

name

string

パッケージの名前。

protocolType

string

パッケージの種類。

PackageSearchRequest

パッケージ検索要求を定義します。

名前 説明
$orderBy

SortOption[]

検索結果を並べ替えるためのオプション。 null に設定すると、結果は関連性で並べ替えて返されます。 複数の並べ替えオプションが指定されている場合、結果は OrderBy で指定された順序で並べ替えられます。

$skip

integer

スキップする結果の数。

$top

integer

返される結果の数。

filters

object

適用するフィルター。 適用するフィルターがない場合は、null に設定します。

includeFacets

boolean

結果のファセットを選択するフラグ。 既定の動作は false です。

searchText

string

検索文字列。

PackageSearchResponseContent

パッケージ検索要求に対して返される応答項目を定義します。

名前 説明
count

integer

一致したパッケージの合計数。

facets

object

各ファセットに対する オブジェクトの Filter 配列を格納するディクショナリ。

infoCode

integer

追加情報を示す数値コード: 0 - OK、1 - アカウントのインデックス再作成中、2 - アカウントのインデックス作成が開始されていません、3 - 無効な要求、4 - プレフィックス ワイルドカード クエリがサポートされていません、5 - コード ファセットがサポートされていないマルチワード、6 - アカウントがオンボード中、7 - アカウントがオンボードまたはインデックス再作成中、8 - maxresult にトリミングされた最上位値が 9 - ブランチがインデックス付けされています、 10 - ファセットが有効になっていない、11 - 作業項目にアクセスできない、19 - コード型フィルターがサポートされていないフレーズ クエリ、20 - コード型フィルターがサポートされていないワイルドカード クエリ。 その他の情報コードは、内部目的で使用されます。

results

PackageResult[]

一致したパッケージの一覧。

SortOption

結果を並べ替える方法を定義します。

名前 説明
field

string

並べ替えを行うフィールド名。

sortOrder

string

結果を並べ替える順序 (ASC/DESC)。