Closed HSAR closed 8 years ago
Did this change go through? If so, what endpoint would I have to use to get the owner from nuget.org?
It did. On https://api-v2v3search-0.nuget.org/query?q=Id:Wintellect.Analyzers you will see authors.
Use http://api.nuget.org/v3/index.json
as the entry point and grab the first SearchQueryService
item to get the correct endpoint.
Sweet. Thanks!
@maartenba - sorry, that looks like authors
. I was looking for owners and that's still missing.
Ah owners are in the referenced registration url.
Not seeing it here https://api.nuget.org/v3/registration0/wintellect.analyzers/index.json?
Ok, I see it now.
Sorry, getting back to this - I don't see the endpoint listed on http://api.nuget.org/v3/index.json. (I thought it was the search service but that one's different).
Best to use the V2 search for now (or SearchGalleryQueryService
from the above document but that is an internal endpoint)
V2 Search doesn't have the field. What's SearchGalleryQueryService
?
The API that powers v2 search.
@maartenba - I've been using the /search/query
API and it's been working well so far. However I ran into an anomaly today: https://www.nuget.org/packages/runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy lists the owners as dotnetframework
. However querying the API says:
{
"totalHits": 1,
"index": "v3-lucene0-v2v3-20160520",
"indexTimestamp": "6/20/2016 9:56:48 PM",
"data": [{
"PackageRegistration": {
"Id": "runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy",
"DownloadCount": 0,
"Owners": []
},
"Version": "0.0.1-alpha",
"NormalizedVersion": "0.0.1-alpha",
"Title": "runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy",
"Description": "runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy",
"Summary": "",
"Authors": "Microsoft",
"Copyright": "Microsoft Corporation. All rights reserved.",
"Tags": "",
"ReleaseNotes": "https://go.microsoft.com/fwlink/?LinkID=799421",
"ProjectUrl": "https://dot.net/",
"IconUrl": "http://go.microsoft.com/fwlink/?LinkID=288859",
"IsLatestStable": false,
"IsLatest": false,
"Listed": false,
"Created": "2016-06-20T18:45:22.0700000+00:00",
"Published": "1900-01-01T00:00:00.0000000+00:00",
"LastUpdated": "1900-01-01T00:00:00.0000000+00:00",
"LastEdited": "2016-06-20T18:45:24.5930000+00:00",
"DownloadCount": 0,
"Dependencies": [],
"SupportedFrameworks": [],
"Hash": "brUa0qmB8nUwFf2S04UH7zb7wN7DvSLrBqPgnvjpJIBqCJaH07wmbrO9P7lDdC6wrxQG7J0Hm6gcA3W0Us/Upw==",
"HashAlgorithm": "SHA512",
"PackageFileSize": 2082,
"LicenseUrl": "http://go.microsoft.com/fwlink/?LinkId=329770",
"RequiresLicenseAcceptance": true
}]
}
Note the empty owners
array. Any idea what might cause this discrepancy?
May be temporal, owner info is not always in there immediately.
The NuGet package property Owners is null in the data class when retrieved using NuGet.Core, and missing entirely from the JSON pulled down - see:
https://api-v3search-0.nuget.org/query?q=Id:Wintellect.Analyzers
The above package definitely has information in the Owners field, as it is listed on the NuGet.org website:
https://www.nuget.org/packages/Wintellect.Analyzers/
But it does not appear in the JSON, and Owners is blank if the same package is fetched programmatically using NuGet.Core.