Skip to main content

Extensions

Adding an Extension

mutation InsertExtension($extension: extensions_insert_input!) {
insert_extensions_one(object: $extension) {
id
label
url
description
}
}

Below is an example query variable that creates an extension called "My External Application".

{
"extension": {
"label": "My External Application",
"url": "https://externalapp/api/test",
"description": "An application that exists outside of Aerie."
}
}

Permitting Roles to run Extensions

mutation InsertExtensionRoles($roles: [extension_roles_insert_input!]!) {
insert_extension_roles(objects: $roles) {
returning {
extension {
id
label
}
role
}
}
}

Below is an example query variable that grants the aerie_admin and user roles to run the extension with an ID of 1.

{
"roles": [
{ "extension_id": 1, "role": "aerie_admin" },
{ "extension_id": 1, "role": "user" }
]
}

Deleting an Extension

mutation DeleteExtension($extension_id: Int!) {
delete_extensions_by_pk(id: $extension_id) {
id
}
}

Get Extensions With Roles

query GetExtensions {
extensions {
description
extension_roles {
id
role
}
id
label
url
}
}

Invocation payloads are discussed on Planning / Advanced - Extensions.