⚠️ 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.

Preview shortcut

post/previewshortcut

Preview a shortcut that contains an alias and destination URL.

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

CreateShortcut request

Array of objects (UserRoleSpecification)

A list of user roles added for the Shortcut.

description
string

A short, plain text blurb to help people understand the intent of the shortcut.

destinationDocumentId
string

Glean Document ID for the URL, if known.

destinationUrl
string

Destination URL for the shortcut.

inputAlias
string

Link text following go/ prefix as entered by the user.

Array of objects (UserRoleSpecification)

A list of user roles removed for the Shortcut.

unlisted
boolean

Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only.

urlTemplate
string

For variable shortcuts, contains the URL template; note, destinationUrl contains default URL.

Responses
200

OK

Response Schema: application/json
object (ShortcutError)
Array of objects (Shortcut)

Exising shortcuts that have a similar destination URL.

object (Shortcut)
400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "inputAlias": "string",
  • "destinationUrl": "string",
  • "destinationDocumentId": "string",
  • "description": "string",
  • "unlisted": true,
  • "urlTemplate": "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"
      }
    ]
}
Response samples
application/json
{
  • "shortcut": {
    • "id": 0,
    • "inputAlias": "string",
    • "destinationUrl": "string",
    • "destinationDocumentId": "string",
    • "description": "string",
    • "unlisted": true,
    • "urlTemplate": "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"
        }
      ],
    • "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": [
          • "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"
          }
        ]
      },
    • "intermediateUrl": "string",
    • "viewPrefix": "string",
    • "isExternal": true,
    • "editUrl": "string",
    • "alias": "string",
    • "title": "string",
    • "roles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ]
    },
  • "existingUrlShortcuts": [
    • {
      • "id": 0,
      • "inputAlias": "string",
      • "destinationUrl": "string",
      • "destinationDocumentId": "string",
      • "description": "string",
      • "unlisted": true,
      • "urlTemplate": "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"
          }
        ],
      • "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": [
            • "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"
            }
          ]
        },
      • "intermediateUrl": "string",
      • "viewPrefix": "string",
      • "isExternal": true,
      • "editUrl": "string",
      • "alias": "string",
      • "title": "string",
      • "roles": [
        • {
          • "sourceDocumentSpec": {
            • "url": "string"
            },
          • "person": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "group": {
            • "type": "DEPARTMENT",
            • "id": "string",
            • "name": "string"
            },
          • "role": "OWNER"
          }
        ]
      }
    ],
  • "error": {
    • "errorType": "NO_PERMISSION"
    }
}