curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/pin \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "queries": [
    "<string>"
  ],
  "audienceFilters": [
    {
      "fieldName": "type",
      "values": [
        {
          "value": "Spreadsheet",
          "relationType": "EQUALS"
        },
        {
          "value": "Presentation",
          "relationType": "EQUALS"
        }
      ]
    }
  ],
  "documentId": "<string>"
}'
{
  "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": "2023-11-07T05:31:56Z",
  "updateTime": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Scio-Actas
string

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

X-Glean-Auth-Type
string

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

Body

application/json
Details about the document and query for the pin.
documentId
string

The document to be pinned.

queries
string[]

The query strings for which the pinned result will show.

audienceFilters
object[]

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

Response

200
application/json
OK
documentId
string
required

The document which should be a pinned result.

id
string

The opaque id of the pin.

audienceFilters
object[]

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

attribution
object
Example:
{
  "name": "George Clooney",
  "obfuscatedId": "abc123"
}
updatedBy
object
Example:
{
  "name": "George Clooney",
  "obfuscatedId": "abc123"
}
createTime
string
updateTime
string
queries
string[]

The query strings for which the pinned result will show.