NAV Navigation
Shell Node.js HTTP

Alvaria™ Cloud AutoFacilitate REST API v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Overview

The Alvaria™ Cloud AutoFacilitate REST API, provided by the AutoFacilitate Server, facilitates easy integration with other systems by providing access to the endpoints needed to interact with the AutoFacilitate Feature

In order to utilize the AutoFacilitate REST API the autofacilitateapi scope is required.

Base URLs:

License: License: Creative Commons Attribution 4.0 International Public License

Authentication

Scope Scope Description
autofacilitateapi manage the complete autofacilitate api

Execute

Execute Service

Code samples

# You can also use wget
curl -X POST https://orgId.via.aspect-cloud.net/via/v2/organizations/{orgId}/autoFacilitate/execute/{vsn} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: string' \
  -H 'x-api-key: string'

const fetch = require('node-fetch');
const inputBody = {
  "triggerParameters": {
    "key": "value"
  },
  "callbackUrls": [
    "https://mycompany.com/callbacks/id=123"
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'x-api-key':'string'
};

fetch('https://orgId.via.aspect-cloud.net/via/v2/organizations/{orgId}/autoFacilitate/execute/{vsn}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST https://orgId.via.aspect-cloud.net/via/v2/organizations/{orgId}/autoFacilitate/execute/{vsn} HTTP/1.1
Host: orgid.via.aspect-cloud.net
Content-Type: application/json
Accept: application/json
Authorization: string
x-api-key: string

POST /via/v2/organizations/{orgId}/autoFacilitate/execute/{vsn}

Starts a service

Body parameter

{
  "triggerParameters": {
    "key": "value"
  },
  "callbackUrls": [
    "https://mycompany.com/callbacks/id=123"
  ]
}
<?xml version="1.0" encoding="UTF-8" ?>
<root>
  <triggerParameters>
    <key>value</key>
  </triggerParameters>
  <callbackUrls>https://mycompany.com/callbacks/id=123</callbackUrls>
</root>

Parameters

Name In Type Required Description
orgId path string true Name of a customer organization
vsn path string true Service name to trigger
Authorization header string true Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint
x-api-key header string true Alvaria-provided value used to track API endpoint usage
body body triggerParameter true JSON/XML Structure with trigger parameters

Example responses

200 Response

{
  "message": "Successfully triggered ServerName@orgId",
  "triggerUUID": "1234"
}

Responses

Status Meaning Description Schema
200 OK Successful response triggerResult
400 Bad Request Validation exception ErrorResponse
401 Unauthorized Unauthorized None
404 Not Found Dialog Id not found on the cluster ErrorResponse
422 Unprocessable Entity Unprocessable Entity ErrorResponse
500 Internal Server Error Internal server error ErrorResponse

Result

Get Trigger result

Code samples

# You can also use wget
curl -X GET https://orgId.via.aspect-cloud.net/via/v2/organizations/{orgId}/autoFacilitate/result/{vsn}/triggerUUID/{triggerUUID} \
  -H 'Accept: application/json' \
  -H 'Authorization: string' \
  -H 'x-api-key: string'

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string',
  'x-api-key':'string'
};

fetch('https://orgId.via.aspect-cloud.net/via/v2/organizations/{orgId}/autoFacilitate/result/{vsn}/triggerUUID/{triggerUUID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET https://orgId.via.aspect-cloud.net/via/v2/organizations/{orgId}/autoFacilitate/result/{vsn}/triggerUUID/{triggerUUID} HTTP/1.1
Host: orgid.via.aspect-cloud.net
Accept: application/json
Authorization: string
x-api-key: string

GET /via/v2/organizations/{orgId}/autoFacilitate/result/{vsn}/triggerUUID/{triggerUUID}

Call this endpoint to get the result from a finished service trigger

Parameters

Name In Type Required Description
orgId path string true Name of a customer organization
vsn path string true Service name from where we want the result
triggerUUID path string true TriggerId of the Service result
Authorization header string true Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint
x-api-key header string true Alvaria-provided value used to track API endpoint usage

Example responses

400 Response

{
  "code": "400",
  "message": "Validation exception",
  "errors": [
    {
      "scope": "global",
      "reason": "Invalid request",
      "message": "The value for the channel is invalid"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content Successful response None
400 Bad Request Validation exception ErrorResponse
401 Unauthorized Unauthorized None
404 Not Found Dialog Id not found on the cluster ErrorResponse
422 Unprocessable Entity Unprocessable Entity ErrorResponse
500 Internal Server Error Internal server error ErrorResponse

Schemas

triggerParameter

{
  "triggerParameters": {
    "key": "value"
  },
  "callbackUrls": [
    "https://mycompany.com/callbacks/id=123"
  ]
}

Properties

Name Type Required Restrictions Description
triggerParameters triggerParameters false none none
callbackUrls callbackUrls false none none

triggerParameters

{
  "key": "value"
}

Properties

Name Type Required Restrictions Description
key string false none none

callbackUrls

[
  "https://mycompany.com/callbacks/id=123"
]

Properties

Name Type Required Restrictions Description
anonymous [urls] false none none

urls

"https://mycompany.com/callbacks/id=123"

Properties

Name Type Required Restrictions Description
anonymous string false none none

ErrorResponse

{
  "code": "400",
  "message": "Validation exception",
  "errors": [
    {
      "scope": "global",
      "reason": "Invalid request",
      "message": "The value for the channel is invalid"
    }
  ]
}

Properties

Name Type Required Restrictions Description
code integer false none HTTP error status
message string false none none
errors [Error] false none none

Error

{
  "scope": "global",
  "reason": "Invalid request",
  "message": "The value for the channel is invalid"
}

Properties

Name Type Required Restrictions Description
scope string false none none
reason string false none none
message string false none none

triggerResult

{
  "message": "Successfully triggered ServerName@orgId",
  "triggerUUID": "1234"
}

Properties

Name Type Required Restrictions Description
message string false none none
triggerUUID integer false none none