REST API
Connections
Derived from the source of github.com/awee-ai/api/cmd/connections.
Awee Connections API · v1.0.0 · 6 endpoints
Connections
Returns the caller's connections, metadata only
conns.Handler.List
Takes no parameters and no request body.
Responses
200 OKOK
accountstringrequiredIs the external account the grant belongs to, e.g.
capabilitiesstring[]Lists what the grant allows, e.g.
idstringrequiredNames the connection in workflows and awee connect commands.
methodstringrequiredIs how the grant was established, one of the Method* constants.
providerstringrequiredIs the service family: "google", "microsoft", "imap", "smtp", "oauth2", "apikey".
settingsobjectHolds non-secret provider settings such as IMAP/SMTP hosts.
settingsobject*stringany additional property401 Unauthorizedthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
[
{
"account": "string",
"capabilities": [
"string"
],
"id": "string",
"method": "string",
"provider": "string",
"settings": {
"key": "string"
}
}
]Upserts a connection with a credential pushed from a local store during pipe auth sync
The path id wins over the body's connection id.
conns.Handler.Put
Path parameters
idstringrequiredBody
application/jsonrequiredconnectionConnectionrequiredIs the non-secret description of one grant against an external service.
connectionConnectionrequiredaccountstringrequiredIs the external account the grant belongs to, e.g.
capabilitiesstring[]Lists what the grant allows, e.g.
idstringrequiredNames the connection in workflows and awee connect commands.
methodstringrequiredIs how the grant was established, one of the Method* constants.
providerstringrequiredIs the service family: "google", "microsoft", "imap", "smtp", "oauth2", "apikey".
settingsobjectHolds non-secret provider settings such as IMAP/SMTP hosts.
settingsobject*stringany additional propertycredentialCredentialrequiredIs the secret material behind a connection.
credentialCredentialrequiredaccess_tokenstringapi_keystringclient_idstringclient_secretstringexpirystring (date-time)kindstringrequiredpasswordstringrefresh_tokenstringscopesstring[]token_urlstringusernamestringResponses
200 OKOK
accountstringrequiredIs the external account the grant belongs to, e.g.
capabilitiesstring[]Lists what the grant allows, e.g.
idstringrequiredNames the connection in workflows and awee connect commands.
methodstringrequiredIs how the grant was established, one of the Method* constants.
providerstringrequiredIs the service family: "google", "microsoft", "imap", "smtp", "oauth2", "apikey".
settingsobjectHolds non-secret provider settings such as IMAP/SMTP hosts.
settingsobject*stringany additional property400 Bad Requestthe request could not be completed
errorstringrequired401 Unauthorizedthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"connection": {
"account": "string",
"capabilities": [
"string"
],
"id": "string",
"method": "string",
"provider": "string",
"settings": {
"key": "string"
}
},
"credential": {
"access_token": "string",
"api_key": "string",
"client_id": "string",
"client_secret": "string",
"expiry": "2024-01-15T09:30:00Z",
"kind": "string",
"password": "string",
"refresh_token": "string",
"scopes": [
"string"
],
"token_url": "string",
"username": "string"
}
}{
"account": "string",
"capabilities": [
"string"
],
"id": "string",
"method": "string",
"provider": "string",
"settings": {
"key": "string"
}
}Removes the caller's connection and its credential
conns.Handler.Delete
Path parameters
idstringrequiredResponses
No response body.
401 Unauthorizedthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"error": "string"
}Returns the live credential for the caller's connection, refreshed first when the stored access token has expired
The pipeline chain store calls this during pipe auth sync.
conns.Handler.GetCredential
Path parameters
idstringrequiredResponses
200 OKOK
connectionConnectionrequiredIs the non-secret description of one grant against an external service.
connectionConnectionrequiredaccountstringrequiredIs the external account the grant belongs to, e.g.
capabilitiesstring[]Lists what the grant allows, e.g.
idstringrequiredNames the connection in workflows and awee connect commands.
methodstringrequiredIs how the grant was established, one of the Method* constants.
providerstringrequiredIs the service family: "google", "microsoft", "imap", "smtp", "oauth2", "apikey".
settingsobjectHolds non-secret provider settings such as IMAP/SMTP hosts.
settingsobject*stringany additional propertycredentialCredentialrequiredIs the secret material behind a connection.
credentialCredentialrequiredaccess_tokenstringapi_keystringclient_idstringclient_secretstringexpirystring (date-time)kindstringrequiredpasswordstringrefresh_tokenstringscopesstring[]token_urlstringusernamestring401 Unauthorizedthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequiredNo request body.
{
"connection": {
"account": "string",
"capabilities": [
"string"
],
"id": "string",
"method": "string",
"provider": "string",
"settings": {
"key": "string"
}
},
"credential": {
"access_token": "string",
"api_key": "string",
"client_id": "string",
"client_secret": "string",
"expiry": "2024-01-15T09:30:00Z",
"kind": "string",
"password": "string",
"refresh_token": "string",
"scopes": [
"string"
],
"token_url": "string",
"username": "string"
}
}Begins an OAuth flow for the provider in the path and returns the authorize URL the SPA redirects the user to
conns.Handler.Start
Path parameters
providerstringrequiredBody
application/jsonrequiredaccountstringrequiredauth_urlstringclient_idstringclient_secretstringconnection_idstringrequiredmethodstringrequiredscopesstring[]token_urlstringResponses
200 OKOK
authorize_urlstringrequired400 Bad Requestthe request could not be completed
errorstringrequired401 Unauthorizedthe request could not be completed
errorstringrequired404 Not Foundthe request could not be completed
errorstringrequired500 Internal Server Errorthe request could not be completed
errorstringrequiredDefaultthe request could not be completed
errorstringrequired{
"account": "string",
"auth_url": "string",
"client_id": "string",
"client_secret": "string",
"connection_id": "string",
"method": "string",
"scopes": [
"string"
],
"token_url": "string"
}{
"authorize_url": "string"
}Is the provider redirect target
It completes the pending flow the state parameter names and persists the resulting credential under the flow's owner, then renders a plain close-this-tab page.
conns.Handler.Callback
Query parameters
errorstringerror_descriptionstringstatestringcodestringResponses
200 OKOK
400 Bad RequestBad Request
500 Internal Server ErrorInternal Server Error
No request body.
"string"