Get Subject
Lookup a single Subject in a Search Index.
This only returns Entry documents within the requested subject which you have permissions to view. You must have permissions to view at least one entry for the Subject.
Method |
GET |
URL |
/v1/index/<index_id>/subject |
Authentication required? |
Only for non-public entries |
Required Roles |
None |
Request Body |
None |
Response Body |
GMetaResult |
Authentication & Authorization
Tokens for this call must have one of these scopes.
urn:globus:auth:scope:search.api.globus.org:all urn:globus:auth:scope:search.api.globus.org:search
Parameters
Parameter Name | Required? | Description |
---|---|---|
subject |
Yes |
The (url-encoded) Subject string |
bypass_visible_to |
No |
Defaults to False. Allowed for Index Admins only. When true, visible_to restrictions will be ignored for this lookup. |
Examples
Fetch the data for subject http://example.com/abc
from the index
ccfa4ab6-7322-4982-9dd6-8ab1eb45f8eb
curl -XGET 'https://search.api.globus.org/v1/index/ccfa4ab6-7322-4982-9dd6-8ab1eb45f8eb/subject?subject=http%3A//example.com/abc'
Response Schemas
GMetaResult
These are components in a search result.
A GMetaResult is a structure similar to a GMetaEntry from the Ingest API, with the following significant differences:
-
visibility information is not exposed; i.e. visible_to is not included
-
metadata for any subject may be an aggregate of multiple documents with different visibility rules or sources. Thus, the result is always returned as an array in which each element represents data provided by a different source or with different visibility
GMetaResult
Field Name | Type | Description |
---|---|---|
subject |
String |
the resource described by this metadata, often a URI |
entries |
Array |
An array of objects containing the data pertaining to the subject. Each object has the fields |
{
"entries": [
{
"content": {
"alpha": {
"beta": "gamma"
}
},
"matched_principal_sets": [],
"entry_id": null
},
{
"content": {
"alpha": {
"beta": "delta"
}
},
"matched_principal_sets": [],
"entry_id": "with_delta"
}
],
"subject": "http://example.com"
}