curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/previewshortcut \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "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"
    }
  ]
}'
{
  "shortcut": {
    "id": 123,
    "permissions": {
      "write": {
        "scopeType": "GLOBAL",
        "create": true,
        "update": true,
        "delete": true
      }
    },
    "createdBy": {
      "name": "George Clooney",
      "obfuscatedId": "abc123"
    },
    "createTime": "2023-11-07T05:31:56Z",
    "updatedBy": {
      "name": "George Clooney",
      "obfuscatedId": "abc123"
    },
    "updateTime": "2023-11-07T05:31:56Z",
    "destinationDocument": {},
    "intermediateUrl": "<string>",
    "viewPrefix": "<string>",
    "isExternal": true,
    "editUrl": "<string>",
    "alias": "<string>",
    "title": "<string>",
    "roles": [
      {}
    ]
  },
  "existingUrlShortcuts": [
    {
      "id": 123,
      "permissions": {
        "write": {
          "scopeType": "GLOBAL",
          "create": true,
          "update": true,
          "delete": true
        }
      },
      "createdBy": {
        "name": "George Clooney",
        "obfuscatedId": "abc123"
      },
      "createTime": "2023-11-07T05:31:56Z",
      "updatedBy": {
        "name": "George Clooney",
        "obfuscatedId": "abc123"
      },
      "updateTime": "2023-11-07T05:31:56Z",
      "destinationDocument": {},
      "intermediateUrl": "<string>",
      "viewPrefix": "<string>",
      "isExternal": true,
      "editUrl": "<string>",
      "alias": "<string>",
      "title": "<string>",
      "roles": [
        {}
      ]
    }
  ],
  "error": {
    "errorType": "NO_PERMISSION"
  }
}

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
CreateShortcut request
inputAlias
string

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

destinationUrl
string

Destination URL for the shortcut.

destinationDocumentId
string

Glean Document ID for the URL, if known.

description
string

A short, plain text blurb to help people understand the intent of 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.

addedRoles
object[]

A list of user roles added for the Shortcut.

removedRoles
object[]

A list of user roles removed for the Shortcut.

Response

200
application/json
OK
shortcut
object
existingUrlShortcuts
object[]

Exising shortcuts that have a similar destination URL.

error
object