⚠️ This documentation pertains to a preview endpoint. This feature is not yet ready for API consumption and may change.
For inquiries or feedback, please contact us at Glean.

Pin Collection

post/pincollection

Given the Collection id and category, pins the Collection to the home page for all company users.

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

PinCollection request

action
required
string
Default: "PIN"

Whether to pin or unpin

Enum: "PIN" "UNPIN"
object (CollectionPinMetadata)
Responses
200

OK

Response Schema: application/json
object (Collection)
object (CollectionError)
object (Collection)
trackingToken
string

An opaque token that represents this particular Collection. To be used for /feedback reporting.

400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "action": "PIN",
  • "data": {
    • "id": 0,
    • "target": {
      • "category": "COMPANY_RESOURCE",
      • "value": "string",
      • "target": "RESOURCE_CARD"
      }
    }
}
Response samples
application/json
{
  • "collection": {
    • "name": "string",
    • "description": "string",
    • "addedRoles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ],
    • "removedRoles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ],
    • "audienceFilters": [
      • {
        • "fieldName": "type",
        • "values": [
          • {
            • "value": "Spreadsheet",
            • "relationType": "EQUALS"
            },
          • {
            • "value": "Presentation",
            • "relationType": "EQUALS"
            }
          ]
        }
      ],
    • "icon": "string",
    • "adminLocked": true,
    • "parentId": 0,
    • "thumbnail": {
      • "photoId": "string",
      • "url": "string"
      },
    • "allowedDatasource": "string",
    • "permissions": {
      • "write": {
        • "scopeType": "GLOBAL",
        • "create": true,
        • "update": true,
        • "delete": true
        }
      },
    • "id": 0,
    • "createTime": "2019-08-24T14:15:22Z",
    • "updateTime": "2019-08-24T14:15:22Z",
    • "creator": {
      • "name": "George Clooney",
      • "obfuscatedId": "abc123"
      },
    • "updatedBy": {
      • "name": "George Clooney",
      • "obfuscatedId": "abc123"
      },
    • "itemCount": 0,
    • "childCount": 0,
    • "items": [
      • {
        • "name": "string",
        • "description": "string",
        • "icon": "string",
        • "collectionId": 0,
        • "documentId": "string",
        • "url": "string",
        • "itemId": "string",
        • "createdBy": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "createdAt": "2019-08-24T14:15:22Z",
        • "document": {
          • "id": "string",
          • "datasource": "string",
          • "connectorType": "API_CRAWL",
          • "docType": "string",
          • "content": {
            • "fullTextList": [
              • "string"
              ]
            },
          • "containerDocument": { },
          • "parentDocument": { },
          • "title": "string",
          • "url": "string",
          • "metadata": {
            • "container": "container",
            • "parentId": "JIRA_EN-1337",
            • "createTime": "2000-01-23T04:56:07.000Z",
            • "datasource": "datasource",
            • "author": {
              • "name": "name"
              },
            • "documentId": "documentId",
            • "updateTime": "2000-01-23T04:56:07.000Z",
            • "mimeType": "mimeType",
            • "objectType": "Feature Request",
            • "components": [
              • "Backend",
              • "Networking"
              ],
            • "status": [
              • "Done"
              ],
            • "customData": {
              • "someCustomField": "someCustomValue"
              }
            },
          • "sections": [
            • {
              • "title": "string",
              • "url": "string"
              }
            ]
          },
        • "shortcut": {
          • "id": 0,
          • "inputAlias": "string",
          • "destinationUrl": "string",
          • "destinationDocumentId": "string",
          • "description": "string",
          • "unlisted": true,
          • "urlTemplate": "string",
          • "addedRoles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ],
          • "removedRoles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ],
          • "permissions": {
            • "write": {
              • "scopeType": "GLOBAL",
              • "create": true,
              • "update": true,
              • "delete": true
              }
            },
          • "createdBy": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "createTime": "2019-08-24T14:15:22Z",
          • "updatedBy": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "updateTime": "2019-08-24T14:15:22Z",
          • "destinationDocument": {
            • "id": "string",
            • "datasource": "string",
            • "connectorType": "API_CRAWL",
            • "docType": "string",
            • "content": {
              • "fullTextList": [
                • null
                ]
              },
            • "containerDocument": { },
            • "parentDocument": { },
            • "title": "string",
            • "url": "string",
            • "metadata": {
              • "container": "container",
              • "parentId": "JIRA_EN-1337",
              • "createTime": "2000-01-23T04:56:07.000Z",
              • "datasource": "datasource",
              • "author": {
                • "name": "name"
                },
              • "documentId": "documentId",
              • "updateTime": "2000-01-23T04:56:07.000Z",
              • "mimeType": "mimeType",
              • "objectType": "Feature Request",
              • "components": [
                • "Backend",
                • "Networking"
                ],
              • "status": [
                • "Done"
                ],
              • "customData": {
                • "someCustomField": "someCustomValue"
                }
              },
            • "sections": [
              • {
                • "title": null,
                • "url": null
                }
              ]
            },
          • "intermediateUrl": "string",
          • "viewPrefix": "string",
          • "isExternal": true,
          • "editUrl": "string",
          • "alias": "string",
          • "title": "string",
          • "roles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ]
          },
        • "collection": null,
        • "itemType": "DOCUMENT"
        }
      ],
    • "pinMetadata": {
      • "existingPins": [
        • {
          • "category": "COMPANY_RESOURCE",
          • "value": "string",
          • "target": "RESOURCE_CARD"
          }
        ],
      • "eligiblePins": [
        • {
          • "id": 0,
          • "target": {
            • "category": "COMPANY_RESOURCE",
            • "value": "string",
            • "target": "RESOURCE_CARD"
            }
          }
        ]
      },
    • "shortcuts": [
      • "string"
      ],
    • "children": [
      • null
      ],
    • "roles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ]
    },
  • "rootCollection": {
    • "name": "string",
    • "description": "string",
    • "addedRoles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ],
    • "removedRoles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ],
    • "audienceFilters": [
      • {
        • "fieldName": "type",
        • "values": [
          • {
            • "value": "Spreadsheet",
            • "relationType": "EQUALS"
            },
          • {
            • "value": "Presentation",
            • "relationType": "EQUALS"
            }
          ]
        }
      ],
    • "icon": "string",
    • "adminLocked": true,
    • "parentId": 0,
    • "thumbnail": {
      • "photoId": "string",
      • "url": "string"
      },
    • "allowedDatasource": "string",
    • "permissions": {
      • "write": {
        • "scopeType": "GLOBAL",
        • "create": true,
        • "update": true,
        • "delete": true
        }
      },
    • "id": 0,
    • "createTime": "2019-08-24T14:15:22Z",
    • "updateTime": "2019-08-24T14:15:22Z",
    • "creator": {
      • "name": "George Clooney",
      • "obfuscatedId": "abc123"
      },
    • "updatedBy": {
      • "name": "George Clooney",
      • "obfuscatedId": "abc123"
      },
    • "itemCount": 0,
    • "childCount": 0,
    • "items": [
      • {
        • "name": "string",
        • "description": "string",
        • "icon": "string",
        • "collectionId": 0,
        • "documentId": "string",
        • "url": "string",
        • "itemId": "string",
        • "createdBy": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "createdAt": "2019-08-24T14:15:22Z",
        • "document": {
          • "id": "string",
          • "datasource": "string",
          • "connectorType": "API_CRAWL",
          • "docType": "string",
          • "content": {
            • "fullTextList": [
              • "string"
              ]
            },
          • "containerDocument": { },
          • "parentDocument": { },
          • "title": "string",
          • "url": "string",
          • "metadata": {
            • "container": "container",
            • "parentId": "JIRA_EN-1337",
            • "createTime": "2000-01-23T04:56:07.000Z",
            • "datasource": "datasource",
            • "author": {
              • "name": "name"
              },
            • "documentId": "documentId",
            • "updateTime": "2000-01-23T04:56:07.000Z",
            • "mimeType": "mimeType",
            • "objectType": "Feature Request",
            • "components": [
              • "Backend",
              • "Networking"
              ],
            • "status": [
              • "Done"
              ],
            • "customData": {
              • "someCustomField": "someCustomValue"
              }
            },
          • "sections": [
            • {
              • "title": "string",
              • "url": "string"
              }
            ]
          },
        • "shortcut": {
          • "id": 0,
          • "inputAlias": "string",
          • "destinationUrl": "string",
          • "destinationDocumentId": "string",
          • "description": "string",
          • "unlisted": true,
          • "urlTemplate": "string",
          • "addedRoles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ],
          • "removedRoles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ],
          • "permissions": {
            • "write": {
              • "scopeType": "GLOBAL",
              • "create": true,
              • "update": true,
              • "delete": true
              }
            },
          • "createdBy": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "createTime": "2019-08-24T14:15:22Z",
          • "updatedBy": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "updateTime": "2019-08-24T14:15:22Z",
          • "destinationDocument": {
            • "id": "string",
            • "datasource": "string",
            • "connectorType": "API_CRAWL",
            • "docType": "string",
            • "content": {
              • "fullTextList": [
                • null
                ]
              },
            • "containerDocument": { },
            • "parentDocument": { },
            • "title": "string",
            • "url": "string",
            • "metadata": {
              • "container": "container",
              • "parentId": "JIRA_EN-1337",
              • "createTime": "2000-01-23T04:56:07.000Z",
              • "datasource": "datasource",
              • "author": {
                • "name": "name"
                },
              • "documentId": "documentId",
              • "updateTime": "2000-01-23T04:56:07.000Z",
              • "mimeType": "mimeType",
              • "objectType": "Feature Request",
              • "components": [
                • "Backend",
                • "Networking"
                ],
              • "status": [
                • "Done"
                ],
              • "customData": {
                • "someCustomField": "someCustomValue"
                }
              },
            • "sections": [
              • {
                • "title": null,
                • "url": null
                }
              ]
            },
          • "intermediateUrl": "string",
          • "viewPrefix": "string",
          • "isExternal": true,
          • "editUrl": "string",
          • "alias": "string",
          • "title": "string",
          • "roles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ]
          },
        • "collection": null,
        • "itemType": "DOCUMENT"
        }
      ],
    • "pinMetadata": {
      • "existingPins": [
        • {
          • "category": "COMPANY_RESOURCE",
          • "value": "string",
          • "target": "RESOURCE_CARD"
          }
        ],
      • "eligiblePins": [
        • {
          • "id": 0,
          • "target": {
            • "category": "COMPANY_RESOURCE",
            • "value": "string",
            • "target": "RESOURCE_CARD"
            }
          }
        ]
      },
    • "shortcuts": [
      • "string"
      ],
    • "children": [
      • null
      ],
    • "roles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ]
    },
  • "trackingToken": "string",
  • "error": {
    • "errorCode": "NAME_EXISTS"
    }
}