Create pin

post/pin

Pin a document as a result for a given search query.Pin results that are known to be a good match.

SecurityBearerAuth
Request
header Parameters
X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

X-Scio-Actas
string <email>

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

Request Body schema: application/json
required

Details about the document and query for the pin.

Array of objects (FacetFilter)

Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search.

documentId
string

The document to be pinned.

queries
Array of strings

The query strings for which the pinned result will show.

Responses
200

OK

Response Schema: application/json
documentId
required
string

The document which should be a pinned result.

object (Person)
Array of objects

Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search.

createTime
string <date-time>
id
string

The opaque id of the pin.

queries
Array of strings

The query strings for which the pinned result will show.

object (Person)
updateTime
string <date-time>
400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "queries": [
    • "string"
    ],
  • "audienceFilters": [
    • {
      • "fieldName": "type",
      • "values": [
        • {
          • "value": "Spreadsheet",
          • "relationType": "EQUALS"
          },
        • {
          • "value": "Presentation",
          • "relationType": "EQUALS"
          }
        ]
      }
    ],
  • "documentId": "string"
}
Response samples
application/json
{
  • "queries": [
    • "string"
    ],
  • "audienceFilters": [
    • {
      • "fieldName": "type",
      • "values": [
        • {
          • "value": "Spreadsheet",
          • "relationType": "EQUALS"
          },
        • {
          • "value": "Presentation",
          • "relationType": "EQUALS"
          }
        ]
      }
    ],
  • "id": "string",
  • "documentId": "string",
  • "attribution": {
    • "name": "George Clooney",
    • "obfuscatedId": "abc123"
    },
  • "updatedBy": {
    • "name": "George Clooney",
    • "obfuscatedId": "abc123"
    },
  • "createTime": "2019-08-24T14:15:22Z",
  • "updateTime": "2019-08-24T14:15:22Z"
}