NAV
Python

Stax Core API v20190206

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

The Stax API is organised around REST, uses resource-oriented URLs, return responses are JSON and uses standard HTTP response codes, authentication and verbs.

Base URLs:

Terms of service Web: Support

Authentication

Accounts

Stax Accounts feature allows you to securely and easily create, view and centrally manage your AWS Accounts and get started deploying applications, workloads and resources.

Update Account Type members

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/account-types/members', headers = headers)

print(r.json())

PUT /20190206/account-types/members

Move Accounts between Account Types.

Body parameter

{
  "Members": [
    {
      "AccountId": "B4407766-E821-450D-B7C8-9EA38B58C432",
      "AccountTypeId": "B4407766-E821-450D-B7C8-9EA38B58C432"
    }
  ]
}

Parameters

Name In Type Required Description
body body accounts.UpdateAccountTypeMembers true none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.UpdateAccountTypeMembersEvent
403 Forbidden The response returned if the request is forbidden. Error
404 Not Found The response returned if the request is unsuccessful. Error

Fetch Accounts

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/accounts', headers = headers)

print(r.json())

GET /20190206/accounts

Return all AWS Accounts within your Stax Organisation.
Optionally, return the requested AWS Account.

Parameters

Name In Type Required Description
account_names query string false The list of Account Names you want returned, comma delimited.
filter query string false The Account statuses to return, comma delimited.
id_filter query string false List of Account IDs you want returned, comma delimited.
aws_account_id_filter query string false List of AWS Account IDs you want returned, comma delimited.
account_type_filter query string false The Account Type IDs to return, comma delimited.
offset query integer false Pagination - The page number to return.
limit query integer false Pagination - The number of items per page to return.
sort query string false The field to sort on.
sort_order query string false The sort order - up or down?
include_tags query boolean false Do you want all the Tags?

Detailed descriptions

filter: The Account statuses to return, comma delimited.

Filter options available: INITIALIZING, ACTIVE, SUSPENDED, MAINTENANCE, AWSERROR, CLOSED, OFFBOARDED, DISCOVERED, ERROR.

account_type_filter: The Account Type IDs to return, comma delimited.

Enumerated Values

Parameter Value
sort_order ASC
sort_order DESC

Example responses

200 Response

{
  "Accounts": [
    {
      "AWSLoginURLs": {
        "admin": "string",
        "developer": "string",
        "readonly": "string"
      },
      "AccountRole": "MEMBER",
      "AccountType": "string",
      "AllocatedTS": "2018-10-11T01:05:45.000Z",
      "AssuranceState": "ACTIVE",
      "AssuranceStateReason": "AWS GuardDuty Hardening has failed",
      "AwsAccountAlias": "string",
      "AwsAccountCanonicalUserId": "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be",
      "AwsAccountId": "012345678901",
      "AwsAccountStatusId": "string",
      "AwsLoginURL": "string",
      "CreatedBy": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Email": "stax.user@example.com",
      "FactoryVersion": "f8cf81b",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LatestCost": 72.52,
      "ModifiedTS": "2019-03-11T01:11:40.000Z",
      "Name": "bakery",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "OrgsOuId": "string",
      "Origin": "STAX",
      "Status": "ACTIVE",
      "StaxCreated": true,
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ],
  "Paging": {
    "NextOffset": 20,
    "PrevOffset": null,
    "Total": 100
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.ReadAccounts

Create Account

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/accounts', headers = headers)

print(r.json())

POST /20190206/accounts

Create a new Stax-hardened AWS Account in your Stax Organisation.

Body parameter

{
  "AccountType": "development",
  "AwsAccountAlias": "string",
  "Name": "bakery",
  "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
body body accounts.CreateAccount true none

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Account": {
      "AccountType": "development",
      "AwsAccountAlias": "string",
      "Name": "automation",
      "Operation": "CREATE",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Tags": {
        "CostCode": "12345"
      }
    },
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.CreateAccountResponse
400 Bad Request The response returned if the request is unsuccessful. Error
409 Conflict The response returned if the account has another operation in progress. Error

Close Account

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/accounts/close', headers = headers)

print(r.json())

POST /20190206/accounts/close

Closes an AWS Account in your Stax Organisation.

Body parameter

{
  "Id": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
}

Parameters

Name In Type Required Description
body body accounts.CloseAccount true none

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.CloseAccountResponse
400 Bad Request The response returned if the request is unsuccessful. Error
409 Conflict The response returned if the account has another operation in progress. Error

Discover Accounts

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/accounts/discover', headers = headers)

print(r.json())

POST /20190206/accounts/discover

Discover all AWS Accounts associated with the org into stax

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string",
  "DetailType": "string",
  "Detail": {
    "TraceId": "string",
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.DiscoverAccountsResponse
400 Bad Request The response returned if the request is unsuccessful due to user input. Error
403 Forbidden The response returned if the account given has already been discovered. Error
404 Not Found The response returned if the requested account cannot be discovered. Error
409 Conflict The response returned if another account discovery operation is already in progress. Error

Discover Account

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/accounts/discover/{aws_account_id}', headers = headers)

print(r.json())

POST /20190206/accounts/discover/{aws_account_id}

Attempt to (re)discover an AWS Account

Parameters

Name In Type Required Description
aws_account_id path string true The AWS Account Id of the Account to discover.

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string",
  "DetailType": "string",
  "Detail": {
    "TraceId": "string",
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.DiscoverAccountsResponse
400 Bad Request The response returned if the request is unsuccessful due to user input. Error
403 Forbidden The response returned if the account given has already been discovered. Error
404 Not Found The response returned if the requested account cannot be discovered. Error
409 Conflict The response returned if the account has another operation in progress. Error

Onboard AWS Account

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/accounts/onboard', headers = headers)

print(r.json())

POST /20190206/accounts/onboard

Onboard an existing, discovered AWS Account to your Stax Organisation.

Body parameter

{
  "AccountType": "Development",
  "AwsAccountId": "012345678901",
  "Name": "bakery",
  "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
body body accounts.OnboardAccount true none

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Account": {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "AccountName": "automation",
      "AccountType": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Name": "automation",
      "Operation": "CREATE",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Tags": {
        "CostCode": "12345"
      }
    },
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.UpdateAccountResponse
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the request is unsuccessful. Error
409 Conflict The response returned if the account has another operation in progress. Error

Fetch Account Types

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/accounts/types', headers = headers)

print(r.json())

GET /20190206/accounts/types

Return all the Account Types in your Stax Organisation.
Optionally, return the requested Account Type.

Parameters

Name In Type Required Description
id_filter query string false List of AccountType IDs you want returned, comma delimited.

Example responses

200 Response

{
  "AccountTypes": [
    {
      "Accounts": [],
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Development",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Policies": [],
      "Roles": [],
      "Status": "ACTIVE",
      "StaxCreated": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.ReadAccountTypes

Create Account Type

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/accounts/types', headers = headers)

print(r.json())

POST /20190206/accounts/types

Create a new Account Type within your Stax Organisation.
Account Types can be used to control Group access.

Body parameter

{
  "Name": "Development"
}

Parameters

Name In Type Required Description
body body accounts.CreateAccountType true none

Example responses

200 Response

{
  "Detail": {
    "AccountType": {
      "Accounts": [],
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Development",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Policies": [],
      "Roles": [],
      "Status": "ACTIVE",
      "StaxCreated": true
    },
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.CreateAccountTypeResponse
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The response returned if the request is forbidden. Error

Update AWS access

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/accounts/types/access', headers = headers)

print(r.json())

PUT /20190206/accounts/types/access

Adjust the AWS role permissions between Account Types and Groups.

Body parameter

{
  "AddRoles": [
    {
      "AccountTypeId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "GroupId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "RoleName": "admin"
    }
  ],
  "RemoveRoles": []
}

Parameters

Name In Type Required Description
body body accounts.UpdateAccountTypeAccess true none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.UpdateAccountTypeAccessEvent
400 Bad Request The response returned if the request is unsuccessful. Error

Delete Account Type

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/accounts/types/{account_type_id}', headers = headers)

print(r.json())

DELETE /20190206/accounts/types/{account_type_id}

Delete an Account Type from your Stax Organisation.
An Account Type can only be deleted if there are no attached Accounts.

Parameters

Name In Type Required Description
account_type_id path string true The UUID of the Catalogue item.

Example responses

200 Response

{
  "AccountTypes": {
    "Accounts": [],
    "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "CreatedTS": "2018-10-11T01:05:45.000Z",
    "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "ModifiedTS": "2018-10-11T01:05:45.000Z",
    "Name": "Development",
    "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "Policies": [],
    "Roles": [],
    "Status": "ACTIVE",
    "StaxCreated": true
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.DeleteAccountTypeResponse
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The response returned if the request is forbidden. Error
404 Not Found The response returned if the request is unsuccessful. Error

Fetch Account Type

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/accounts/types/{account_type_id}', headers = headers)

print(r.json())

GET /20190206/accounts/types/{account_type_id}

Return all the Account Types in your Stax Organisation.
Optionally, return the requested Account Type.

Parameters

Name In Type Required Description
account_type_id path string true The UUID of the Account Type.
id_filter query string false List of AccountType IDs you want returned, comma delimited.

Example responses

200 Response

{
  "AccountTypes": [
    {
      "Accounts": [],
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Development",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Policies": [],
      "Roles": [],
      "Status": "ACTIVE",
      "StaxCreated": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.ReadAccountTypes

Update Account Type

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/accounts/types/{account_type_id}', headers = headers)

print(r.json())

PUT /20190206/accounts/types/{account_type_id}

Change the details of an Account Type, such as the name.

Body parameter

{
  "Name": "Development"
}

Parameters

Name In Type Required Description
account_type_id path string true The UUID of the Account Type to update.
body body accounts.UpdateAccountType true none

Example responses

200 Response

{
  "AccountTypes": {
    "Accounts": [],
    "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "CreatedTS": "2018-10-11T01:05:45.000Z",
    "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "ModifiedTS": "2018-10-11T01:05:45.000Z",
    "Name": "Development",
    "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "Policies": [],
    "Roles": [],
    "Status": "ACTIVE",
    "StaxCreated": true
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.UpdateAccountTypeResponse
403 Forbidden The response returned if the request is forbidden. Error
404 Not Found The response returned if the request is unsuccessful. Error

Fetch Account

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/accounts/{account_id}', headers = headers)

print(r.json())

GET /20190206/accounts/{account_id}

Return the requested AWS Account.

Parameters

Name In Type Required Description
account_id path string true The Stax UUID of the Account.
account_names query string false The list of Account Names you want returned, comma delimited.
filter query string false The Account statuses to return, comma delimited.
id_filter query string false List of Account IDs you want returned, comma delimited.
aws_account_id_filter query string false List of AWS Account IDs you want returned, comma delimited.
account_type_filter query string false The Account Type IDs to return, comma delimited.
offset query integer false Pagination - The page number to return.
limit query integer false Pagination - The number of items per page to return.
sort query string false The field to sort on.
sort_order query string false The sort order - up or down?
include_tags query boolean false Do you want all the Tags?

Detailed descriptions

filter: The Account statuses to return, comma delimited.

Filter options available: INITIALIZING, ACTIVE, SUSPENDED, MAINTENANCE, AWSERROR, CLOSED, OFFBOARDED, DISCOVERED, ERROR.

account_type_filter: The Account Type IDs to return, comma delimited.

Enumerated Values

Parameter Value
sort_order ASC
sort_order DESC

Example responses

200 Response

{
  "Accounts": [
    {
      "AWSLoginURLs": {
        "admin": "string",
        "developer": "string",
        "readonly": "string"
      },
      "AccountRole": "MEMBER",
      "AccountType": "string",
      "AllocatedTS": "2018-10-11T01:05:45.000Z",
      "AssuranceState": "ACTIVE",
      "AssuranceStateReason": "AWS GuardDuty Hardening has failed",
      "AwsAccountAlias": "string",
      "AwsAccountCanonicalUserId": "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be",
      "AwsAccountId": "012345678901",
      "AwsAccountStatusId": "string",
      "AwsLoginURL": "string",
      "CreatedBy": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Email": "stax.user@example.com",
      "FactoryVersion": "f8cf81b",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LatestCost": 72.52,
      "ModifiedTS": "2019-03-11T01:11:40.000Z",
      "Name": "bakery",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "OrgsOuId": "string",
      "Origin": "STAX",
      "Status": "ACTIVE",
      "StaxCreated": true,
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ],
  "Paging": {
    "NextOffset": 20,
    "PrevOffset": null,
    "Total": 100
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.ReadAccounts

Update Account

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/accounts/{account_id}', headers = headers)

print(r.json())

PUT /20190206/accounts/{account_id}

Change the details of an Account, such as the name, tags or Account Type

Body parameter

{
  "AccountType": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "AwsAccountAlias": "aws-iam-alias",
  "Name": "bakery",
  "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
account_id path string true The UUID of the Account to update.
body body accounts.UpdateAccount true none

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Account": {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "AccountName": "automation",
      "AccountType": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Name": "automation",
      "Operation": "CREATE",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Tags": {
        "CostCode": "12345"
      }
    },
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. accounts.UpdateAccountResponse
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the request is unsuccessful. Error
409 Conflict The response returned if the account has another operation in progress. Error

Fetch Account Policy Attachments

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/accounts/{account_id}/policies', headers = headers)

print(r.json())

GET /20190206/accounts/{account_id}/policies

Return the policies that are attached to the AWS Account.

Parameters

Name In Type Required Description
account_id path string true The Stax UUID of the Account.

Example responses

200 Response

{
  "PolicyAttachments": [
    {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PolicyAttachmentType": "ORGANISATIONAL_UNIT",
      "PolicyId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.ReadPolicyAttachments
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the Account could not be found. Error

Groups

Stax Groups can be assigned access to either built-in Stax roles by assigning AWS roles to a group, or to a customized Permission Set.

Fetch Groups

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/groups', headers = headers)

print(r.json())

GET /20190206/groups

Return all Groups within your Stax Organisation.
Optionally, return the requested Group.

Parameters

Name In Type Required Description
id_filter query string false List of Group IDs you want returned, comma delimited.

Example responses

200 Response

{
  "Groups": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "GroupType": "LOCAL",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "DevOps",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Users": [
        "e893d7e0-9306-11e9-bc42-526af7764f64"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadGroupsResponse

Create Group

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/groups', headers = headers)

print(r.json())

POST /20190206/groups

Create a new Group within your Stax Organisation.

Body parameter

{
  "Name": "devops"
}

Parameters

Name In Type Required Description
body body teams.CreateGroup true none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string",
  "GroupId": "e893d7e0-9306-11e9-bc42-526af7764f64"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.CreateGroupEvent
400 Bad Request The response returned if the request is unsuccessful. Error
409 Conflict A group with the same name already exists. StaxEvent

Update Group Members

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/groups/members', headers = headers)

print(r.json())

PUT /20190206/groups/members

Add members to a Group or Remove members from a Group

Body parameter

{
  "AddMembers": [
    {
      "GroupId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "UserId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  ],
  "RemoveMembers": [
    {
      "GroupId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "UserId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  ]
}

Parameters

Name In Type Required Description
body body teams.UpdateGroupMembers true none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.UpdateGroupMembersEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found Could not locate user or group. StaxEvent

Delete Group

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/groups/{group_id}', headers = headers)

print(r.json())

DELETE /20190206/groups/{group_id}

Delete a Group from your Stax Organisation.
A Group can only be deleted if there are no team members in the Group.

Parameters

Name In Type Required Description
group_id path string true The UUID of Group to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.DeleteGroupEvent
400 Bad Request The Group still contains members. StaxEvent
404 Not Found The Group could not be found. StaxEvent

Fetch Group

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/groups/{group_id}', headers = headers)

print(r.json())

GET /20190206/groups/{group_id}

Return the requested Group from your Stax Organisation.

Parameters

Name In Type Required Description
group_id path string true The UUID of the Group to return.

Example responses

200 Response

{
  "Groups": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "GroupType": "LOCAL",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "DevOps",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Users": [
        "e893d7e0-9306-11e9-bc42-526af7764f64"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadGroupsResponse
404 Not Found Group not found. Error

Update Group

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/groups/{group_id}', headers = headers)

print(r.json())

PUT /20190206/groups/{group_id}

Change the details of a Group, such as the name.

Body parameter

{
  "Name": "devops"
}

Parameters

Name In Type Required Description
group_id path string true The UUID of the Group to update.
body body teams.UpdateGroup true none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.UpdateGroupEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Group could not be found. StaxEvent
409 Conflict A group with the same name already exists. StaxEvent

Networking

Stax Networks provides a simple and flexible way of deploying AWS network topologies.

Fetch DNS Resolvers

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dnsresolvers', headers = headers)

print(r.json())

GET /20190206/networking/dnsresolvers


Returns the DNS Resolver of the Stax Networking Hub.
Providing the UUID of a Stax DNS Resolver will return a specific Stax DNS Resolver's details.

Parameters

Name In Type Required Description
status query string false The Stax DNS Resolver statuses to return, comma delimited.

Detailed descriptions

status: The Stax DNS Resolver statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DnsResolvers": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "InboundIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Interfaces": 2,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "dns",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OutboundIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDnsResolvers
404 Not Found The Stax Networking resource cannot be found. Error

Delete DNS Resolver

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/dnsresolvers/{dns_resolver_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/dnsresolvers/{dns_resolver_id}


Deletes a Stax DNS Resolver within a Stax Networking Hub.

Parameters

Name In Type Required Description
dns_resolver_id path uuidv4 true The UUID of the Stax DNS Resolver to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteDnsResolverEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The Stax Networking Hub doesn't match supplied credentials. Error
404 Not Found The Stax DNS Resolver to delete cannot be found. Error

Fetch DNS Resolver

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dnsresolvers/{dns_resolver_id}', headers = headers)

print(r.json())

GET /20190206/networking/dnsresolvers/{dns_resolver_id}


Returns the DNS Resolver of the Stax Networking Hub.
Providing the UUID of a Stax DNS Resolver will return a specific Stax DNS Resolver's details.

Parameters

Name In Type Required Description
dns_resolver_id path uuidv4 true The UUID of the Stax DNS Resolver to fetch.
status query string false The Stax DNS Resolver statuses to return, comma delimited.

Detailed descriptions

status: The Stax DNS Resolver statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DnsResolvers": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "InboundIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Interfaces": 2,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "dns",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OutboundIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDnsResolvers
404 Not Found The Stax Networking resource cannot be found. Error

Update DNS Resolver

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/dnsresolvers/{dns_resolver_id}', headers = headers)

print(r.json())

PUT /20190206/networking/dnsresolvers/{dns_resolver_id}


Updates the attributes for a given Stax DNS Resolver. Only supplied values are updated.

Body parameter

{
  "Name": "dns",
  "NumberOfInterfaces": 2,
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
dns_resolver_id path uuidv4 true The UUID of the Stax DNS Resolver to update.
body body networking.UpdateDnsResolver true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateDnsResolverEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The Stax Networking Hub doesn't match supplied credentials. Error
404 Not Found The Stax DNS Resolver to update cannot be found. Error

Fetch Resolver DNS Rules

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dnsresolvers/{dns_resolver_id}/dnsrules', headers = headers)

print(r.json())

GET /20190206/networking/dnsresolvers/{dns_resolver_id}/dnsrules


Returns the Stax DNS Rules of the Stax DNS Resolver.
Providing the UUID of a Stax DNS Rule will return a specific Stax DNS Rule's details.

Parameters

Name In Type Required Description
dns_resolver_id path uuidv4 true The UUID of the Stax DNS Resolver.
status query string false The Stax DNS Rule statuses to return, comma delimited.

Detailed descriptions

status: The Stax DNS Rule statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DnsRules": [
    {
      "AwsRuleId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DnsResolverId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "DomainName": "test.local",
      "ForwarderIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "on-premises",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDnsRules
404 Not Found The Stax Networking resource cannot be found. Error

Create DNS Rule

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/dnsresolvers/{dns_resolver_id}/dnsrules', headers = headers)

print(r.json())

POST /20190206/networking/dnsresolvers/{dns_resolver_id}/dnsrules


Creates a Stax DNS Rule within a Stax DNS Resolver.

Body parameter

{
  "DomainName": "test.local",
  "ForwarderIpAddresses": [
    "192.168.0.1",
    "192.168.0.2"
  ],
  "Name": "on-premises",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
dns_resolver_id path uuidv4 true The UUID of the Stax DNS Resolver to create the Stax DNS Rule within.
body body networking.CreateDnsRule true none

Example responses

200 Response

{
  "Detail": {
    "DnsRule": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateDnsRuleEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The Stax Networking Hub doesn't match supplied credentials. Error
404 Not Found The Stax DNS Resolver to create the Stax DNS Rule within cannot be found. Error

Fetch DNS Rules

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dnsrules', headers = headers)

print(r.json())

GET /20190206/networking/dnsrules


Returns the Stax DNS Rules of the Stax DNS Resolver.
Providing the UUID of a Stax DNS Rule will return a specific Stax DNS Rule's details.

Parameters

Name In Type Required Description
status query string false The Stax DNS Rule statuses to return, comma delimited.

Detailed descriptions

status: The Stax DNS Rule statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DnsRules": [
    {
      "AwsRuleId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DnsResolverId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "DomainName": "test.local",
      "ForwarderIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "on-premises",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDnsRules
404 Not Found The Stax Networking resource cannot be found. Error

Delete DNS Rule

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/dnsrules/{dns_rule_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/dnsrules/{dns_rule_id}


Deletes a Stax DNS Rule within a Stax DNS Resolver

Parameters

Name In Type Required Description
dns_rule_id path uuidv4 true The UUID of the Stax DNS Rule.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteDnsRuleEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The Stax Networking Hub doesn't match supplied credentials. Error
404 Not Found The Stax DNS Rule to delete cannot be found. Error

Fetch DNS Rule

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dnsrules/{dns_rule_id}', headers = headers)

print(r.json())

GET /20190206/networking/dnsrules/{dns_rule_id}


Returns the Stax DNS Rules of the Stax DNS Resolver.
Providing the UUID of a Stax DNS Rule will return a specific Stax DNS Rule's details.

Parameters

Name In Type Required Description
dns_rule_id path uuidv4 true The UUID of the Stax DNS Rule to fetch.
status query string false The Stax DNS Rule statuses to return, comma delimited.

Detailed descriptions

status: The Stax DNS Rule statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DnsRules": [
    {
      "AwsRuleId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DnsResolverId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "DomainName": "test.local",
      "ForwarderIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "on-premises",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDnsRules
404 Not Found The Stax Networking resource cannot be found. Error

Update DNS Rule

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/dnsrules/{dns_rule_id}', headers = headers)

print(r.json())

PUT /20190206/networking/dnsrules/{dns_rule_id}


Updates the attributes for a given Stax DNS Rule. Only supplied values are updated.

Body parameter

{
  "ForwarderIpAddresses": [
    "192.168.0.1",
    "192.168.0.2"
  ],
  "Name": "on-premises",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
dns_rule_id path uuidv4 true The UUID of the Stax DNS Rule to update.
body body networking.UpdateDnsRule true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateDnsRuleEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The Stax Networking Hub doesn't match supplied credentials. Error
404 Not Found The Stax DNS Rule to update cannot be found. Error

Fetch DX Associations

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxassociations', headers = headers)

print(r.json())

GET /20190206/networking/dxassociations


Returns all the Stax DX Asssociations.
Providing the UUID of a Stax Networking Hub will return the Stax DX Associations for the Stax Networking Hub.
Providing the UUID of a Stax DX Association will return a specific Stax DX Association's details.

Parameters

Name In Type Required Description
status query string false The Stax DX Association statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Association statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxAssociations": [
    {
      "AwsAssociationId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Prefixes": [
        "192.168.0.0/24",
        "192.168.1.0/24"
      ],
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxAssociations
404 Not Found The Stax Networking resource cannot be found. Error

Delete DX Association

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/dxassociations/{dx_association_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/dxassociations/{dx_association_id}


Deletes a Stax DX Association.

Parameters

Name In Type Required Description
dx_association_id path uuidv4 true The UUID of the Stax DX Association to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteDxAssociationEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax DX Association to delete cannot be found. Error

Fetch DX Association

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxassociations/{dx_association_id}', params={
  'status': 'ACTIVE,CREATE_IN_PROGRESS,CREATE_FAILED,UPDATE_IN_PROGRESS'
}, headers = headers)

print(r.json())

GET /20190206/networking/dxassociations/{dx_association_id}


Returns all the Stax DX Asssociations.
Providing the UUID of a Stax Networking Hub will return the Stax DX Associations for the Stax Networking Hub.
Providing the UUID of a Stax DX Association will return a specific Stax DX Association's details.

Parameters

Name In Type Required Description
dx_association_id path uuidv4 true The UUID of the Stax DX Association to fetch.
status query string true The Stax DX Association statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Association statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxAssociations": [
    {
      "AwsAssociationId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Prefixes": [
        "192.168.0.0/24",
        "192.168.1.0/24"
      ],
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxAssociations
404 Not Found The Stax Networking resource cannot be found. Error

Update DX Association

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/dxassociations/{dx_association_id}', headers = headers)

print(r.json())

PUT /20190206/networking/dxassociations/{dx_association_id}


Updates the attributes for a given Stax DX Association. Only supplied values are updated.

Body parameter

{
  "Prefixes": [
    "192.168.0.0/24",
    "192.168.1.0/24"
  ]
}

Parameters

Name In Type Required Description
dx_association_id path uuidv4 true The UUID of the Stax DX Association to update.
body body networking.UpdateDxAssociation true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateDxAssociationEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax DX Association to update cannot be found. Error

Fetch DX Gateways

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxgateways', headers = headers)

print(r.json())

GET /20190206/networking/dxgateways


Returns all the Stax DX Gateways.
Providing the UUID of a Stax Networking Hub will return the Stax DX Gateways associated to the Stax Networking Hub.
Providing the UUID of a Stax DX Gateway will return a specific Stax DX Gateway's details.

Parameters

Name In Type Required Description
status query string false The Stax DX Gateway statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Gateway statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxGateways": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "AwsGatewayId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "ExternalResource": false,
      "GatewayType": "TRANSIT",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxGateways
404 Not Found The Stax Networking resource cannot be found. Error

Delete DX Gateway

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/dxgateways/{dx_gateway_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/dxgateways/{dx_gateway_id}


Deletes a Stax DX Gateway.

Parameters

Name In Type Required Description
dx_gateway_id path uuidv4 true The UUID of the Stax DX Gateway to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteDxGatewayEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax DX Vif to delete cannot be found. Error

Fetch DX Gateway

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxgateways/{dx_gateway_id}', headers = headers)

print(r.json())

GET /20190206/networking/dxgateways/{dx_gateway_id}


Returns all the Stax DX Gateways.
Providing the UUID of a Stax Networking Hub will return the Stax DX Gateways associated to the Stax Networking Hub.
Providing the UUID of a Stax DX Gateway will return a specific Stax DX Gateway's details.

Parameters

Name In Type Required Description
dx_gateway_id path uuidv4 true The UUID of the Stax DX Gateway to fetch.
status query string false The Stax DX Gateway statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Gateway statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxGateways": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "AwsGatewayId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "ExternalResource": false,
      "GatewayType": "TRANSIT",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxGateways
404 Not Found The Stax Networking resource cannot be found. Error

Fetch Gateway DX Associations

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxgateways/{dx_gateway_id}/dxassociations', headers = headers)

print(r.json())

GET /20190206/networking/dxgateways/{dx_gateway_id}/dxassociations


Returns all the Stax DX Asssociations.
Providing the UUID of a Stax Networking Hub will return the Stax DX Associations for the Stax Networking Hub.
Providing the UUID of a Stax DX Association will return a specific Stax DX Association's details.

Parameters

Name In Type Required Description
dx_gateway_id path uuidv4 true The UUID of the Stax DX Gateway to fetch associations for.
status query string false The Stax DX Association statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Association statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxAssociations": [
    {
      "AwsAssociationId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Prefixes": [
        "192.168.0.0/24",
        "192.168.1.0/24"
      ],
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxAssociations
404 Not Found The Stax Networking resource cannot be found. Error

Create DX Association

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/dxgateways/{dx_gateway_id}/dxassociations', headers = headers)

print(r.json())

POST /20190206/networking/dxgateways/{dx_gateway_id}/dxassociations


Creates a Stax DX Association between a Stax Networking Hub or Stax VPC and a Stax DX Gateway.

Providing a NetworkingHubId will attempt to associate the Direct Connect Gateway that contains Transit
VIFs to the Networking Hubs Transit Gateway.

Providing a VPCId will attempt attempt to associate the Direct Connect Gateway that contains Private VIFs
to the VPCs Virtual Private Gateway.

Body parameter

{
  "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "Prefixes": [
    "192.168.0.0/24",
    "192.168.1.0/24"
  ]
}

Parameters

Name In Type Required Description
dx_gateway_id path uuidv4 true The UUID of the Stax DX Gateway to association with a Stax Networking Hub.
body body networking.CreateDxAssociation true none

Example responses

200 Response

{
  "Detail": {
    "DxAssociation": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateDxAssociationEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Resources to create the DX Association for cannot be found. Error

Fetch Gateway DX Vifs

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxgateways/{dx_gateway_id}/dxvifs', headers = headers)

print(r.json())

GET /20190206/networking/dxgateways/{dx_gateway_id}/dxvifs


Returns all the Stax DX Vifs.
Providing the UUID of a Stax DX Gateway will return the Stax DX Vifs attached to the Stax DX Gateway.
Providing the UUID of a Stax DX Vif will return a specific Stax DX Vif's details.

Parameters

Name In Type Required Description
dx_gateway_id path uuidv4 true The UUID of the Stax DX Vif.
status query string false The Stax DX Gateway statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Gateway statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxVifs": [
    {
      "Asn": 64512,
      "AwsConnectionId": "dxcon-abcdefgh",
      "AwsRouterIp": "192.168.0.2/30",
      "AwsVifId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "ExternalResource": false,
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "JumboMtu": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod VIF",
      "Region": "ap-northeast-1",
      "RouterIp": "192.168.0.1/30",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VifType": "TRANSIT",
      "Vlan": 4000
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxVifs
404 Not Found The Stax Networking resource cannot be found. Error

Create DX Resources

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/dxresources', headers = headers)

print(r.json())

POST /20190206/networking/dxresources


Creates a Stax DX Resource, a DX Gateway and/or DX Vif.

Body parameter

{
  "Gateway": {
    "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
    "Asn": 64512,
    "Name": "Prod Gateway"
  },
  "Vif": {
    "Asn": 64513,
    "AwsConnectionId": "dxcon-abcdefgh",
    "AwsRouterIp": "192.168.0.2/30",
    "BgpAuthKey": "secret",
    "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
    "JumboMtu": false,
    "Name": "Prod VIF",
    "RouterIp": "192.168.0.1/30",
    "Tags": {
      "CostCode": "12345"
    },
    "Vlan": 4000
  }
}

Parameters

Name In Type Required Description
body body networking.CreateDxResource true none

Example responses

200 Response

{
  "Detail": {
    "DxResource": {
      "Gateway": {
        "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
      },
      "Vif": {
        "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
      }
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateDxResourceEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Resource to deploy the DX Resources into cannot be found. Error

Fetch DX Vifs

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxvifs', headers = headers)

print(r.json())

GET /20190206/networking/dxvifs


Returns all the Stax DX Vifs.
Providing the UUID of a Stax DX Gateway will return the Stax DX Vifs attached to the Stax DX Gateway.
Providing the UUID of a Stax DX Vif will return a specific Stax DX Vif's details.

Parameters

Name In Type Required Description
status query string false The Stax DX Gateway statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Gateway statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxVifs": [
    {
      "Asn": 64512,
      "AwsConnectionId": "dxcon-abcdefgh",
      "AwsRouterIp": "192.168.0.2/30",
      "AwsVifId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "ExternalResource": false,
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "JumboMtu": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod VIF",
      "Region": "ap-northeast-1",
      "RouterIp": "192.168.0.1/30",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VifType": "TRANSIT",
      "Vlan": 4000
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxVifs
404 Not Found The Stax Networking resource cannot be found. Error

Delete DX Vif

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/dxvifs/{dx_vif_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/dxvifs/{dx_vif_id}


Deletes a Stax DX Vif.

Parameters

Name In Type Required Description
dx_vif_id path uuidv4 true The UUID of the Stax DX Vif to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteDxVifEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax DX Vif to delete cannot be found. Error

Fetch DX Vif

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxvifs/{dx_vif_id}', headers = headers)

print(r.json())

GET /20190206/networking/dxvifs/{dx_vif_id}


Returns all the Stax DX Vifs.
Providing the UUID of a Stax DX Gateway will return the Stax DX Vifs attached to the Stax DX Gateway.
Providing the UUID of a Stax DX Vif will return a specific Stax DX Vif's details.

Parameters

Name In Type Required Description
dx_vif_id path uuidv4 true The UUID of the Stax DX Vif to fetch.
status query string false The Stax DX Gateway statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Gateway statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxVifs": [
    {
      "Asn": 64512,
      "AwsConnectionId": "dxcon-abcdefgh",
      "AwsRouterIp": "192.168.0.2/30",
      "AwsVifId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "ExternalResource": false,
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "JumboMtu": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod VIF",
      "Region": "ap-northeast-1",
      "RouterIp": "192.168.0.1/30",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VifType": "TRANSIT",
      "Vlan": 4000
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxVifs
404 Not Found The Stax Networking resource cannot be found. Error

Update DX VIf

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/dxvifs/{dx_vif_id}', headers = headers)

print(r.json())

PUT /20190206/networking/dxvifs/{dx_vif_id}


Updates the attributes for a given Stax DX Vif. Only supplied values are updated.

Body parameter

{
  "JumboMtu": false,
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
dx_vif_id path uuidv4 true The UUID of the Stax DX Vif to update.
body body networking.UpdateDxVif true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateDxVifEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax DX Vif to update cannot be found. Error

Fetch DX VIF Status

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/dxvifs/{dx_vif_id}/status', headers = headers)

print(r.json())

GET /20190206/networking/dxvifs/{dx_vif_id}/status


Returns the connectivity status of the BPG Peers for a specific DX VIF

Parameters

Name In Type Required Description
dx_vif_id path uuidv4 true The UUID of the Stax DX Gateway where the Stax DX Vif is attached.

Example responses

200 Response

{
  "DxVifStatus": [
    {
      "BgpPeerId": "bgp-peer-id",
      "BgpStatus": "up"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxVifStatus
404 Not Found The Stax DX VIF cannot be found. Error

Fetch CIDR Exclusions

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/exclusions', headers = headers)

print(r.json())

GET /20190206/networking/exclusions


Returns a list of CIDR Exclusions.
Can use the UUID of a CIDR Exclusions to return a specific CIDR Exclusions details.

Parameters

Name In Type Required Description
status query string false The Hub statuses to return, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

Example responses

200 Response

{
  "Exclusions": [
    {
      "Cidr": "10.128.0.0/19",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "datacenter exclusion",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrExclusions
404 Not Found The Stax Networking resource cannot be found. Error

Delete CIDR Exclusion

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/exclusions/{exclusion_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/exclusions/{exclusion_id}


Deletes a CIDR Exclusion within a Stax Networking Hub.

Parameters

Name In Type Required Description
exclusion_id path uuidv4 true The UUID of the Exclusion to Delete.

Example responses

200 Response

{
  "Exclusions": [
    {
      "Cidr": "10.128.0.0/19",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "datacenter exclusion",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrExclusions
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The CIDR Exclusion to delete cannot be found or is already deleted. Error

Fetch CIDR Exclusion

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/exclusions/{exclusion_id}', headers = headers)

print(r.json())

GET /20190206/networking/exclusions/{exclusion_id}


Returns a list of CIDR Exclusions.
Can use the UUID of a CIDR Exclusions to return a specific CIDR Exclusions details.

Parameters

Name In Type Required Description
exclusion_id path uuidv4 true The UUID of the Exclusion to read.
status query string false The Hub statuses to return, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

Example responses

200 Response

{
  "Exclusions": [
    {
      "Cidr": "10.128.0.0/19",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "datacenter exclusion",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrExclusions
404 Not Found The Stax Networking resource cannot be found. Error

Update CIDR Exclusion

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/exclusions/{exclusion_id}', headers = headers)

print(r.json())

PUT /20190206/networking/exclusions/{exclusion_id}


Updates a CIDR Exclusion within a Stax Networking Hub

Body parameter

{
  "Description": "string",
  "Name": "data-center",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
exclusion_id path uuidv4 true The UUID of the Exclusion to update.
body body networking.UpdateCidrExclusion true none

Example responses

200 Response

{
  "Description": "string",
  "Name": "data-center",
  "Tags": {
    "CostCode": "12345"
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateCidrExclusion
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The CIDR Exclusion to update cannot be found. Error

Fetch Hub Peerings

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubpeerings', headers = headers)

print(r.json())

GET /20190206/networking/hubpeerings


Returns all the Stax Hub Peerings.

Parameters

Name In Type Required Description
status query string false The Stax Hub Peering statuses to return, comma delimited.

Detailed descriptions

status: The Stax Hub Peering statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, PENDING_ACCEPT, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS

Example responses

200 Response

{
  "HubPeerings": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DestinationAwsAccountId": "000011112222",
      "DestinationAwsRegion": "ap-northeast-1",
      "DestinationAwsTgwId": "tgw-0000aaaa1111bbbbb",
      "DestinationNetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "DestinationTgwPeeringAttachmentId": "tgw-attach-0000aaaa1111bbbbb",
      "ExternalResource": false,
      "HubPeeringTarget": "STAX_RESOURCE",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod-Shared",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "SourceAwsAccountId": "000011112222",
      "SourceAwsRegion": "ap-northeast-1",
      "SourceAwsTgwId": "tgw-0000aaaa1111bbbbb",
      "SourceNetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "SourceTgwPeeringAttachmentId": "tgw-attach-0000aaaa1111bbbbb",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadHubPeerings
404 Not Found The Stax Networking resource cannot be found. Error

Delete Hub Peering

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/hubpeerings/{hub_peering_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/hubpeerings/{hub_peering_id}


Deletes a Stax Hub Peering.

Parameters

Name In Type Required Description
hub_peering_id path uuidv4 true The UUID of the Stax Hub Peering to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteHubPeeringEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Hub Peering to delete cannot be found. Error

Fetch Hub Peering

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubpeerings/{hub_peering_id}', headers = headers)

print(r.json())

GET /20190206/networking/hubpeerings/{hub_peering_id}


Providing the UUID of a Stax Hub Peering will return a specific Stax Hub Peering.

Parameters

Name In Type Required Description
hub_peering_id path uuidv4 true The UUID of the Stax Hub Peering to Read.
status query string false The Stax Hub Peering statuses to return, comma delimited.

Detailed descriptions

status: The Stax Hub Peering statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, PENDING_ACCEPT, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS

Example responses

200 Response

{
  "HubPeerings": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DestinationAwsAccountId": "000011112222",
      "DestinationAwsRegion": "ap-northeast-1",
      "DestinationAwsTgwId": "tgw-0000aaaa1111bbbbb",
      "DestinationNetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "DestinationTgwPeeringAttachmentId": "tgw-attach-0000aaaa1111bbbbb",
      "ExternalResource": false,
      "HubPeeringTarget": "STAX_RESOURCE",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod-Shared",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "SourceAwsAccountId": "000011112222",
      "SourceAwsRegion": "ap-northeast-1",
      "SourceAwsTgwId": "tgw-0000aaaa1111bbbbb",
      "SourceNetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "SourceTgwPeeringAttachmentId": "tgw-attach-0000aaaa1111bbbbb",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadHubPeerings
404 Not Found The Stax Networking resource cannot be found. Error

Update Hub Peering

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/hubpeerings/{hub_peering_id}', headers = headers)

print(r.json())

PUT /20190206/networking/hubpeerings/{hub_peering_id}


Updates the attributes for a given Stax Hub Peering. Only supplied values are updated.

Body parameter

{
  "Name": "Prod-Shared",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
hub_peering_id path uuidv4 true The UUID of the Stax Hub Peering to update.
body body networking.UpdateHubPeering true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateHubPeeringEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Hub Peering to update cannot be found. Error

Fetch Networking Hubs

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs', headers = headers)

print(r.json())

GET /20190206/networking/hubs


Returns a list of networking hubs in your Stax Organisation.
Can use the UUID of a Hub to return a specific hub details.

Parameters

Name In Type Required Description
status query string false The Hub statuses to return, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, UPDATE_IN_PROGRESS, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "Hubs": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "my-hub",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "InterfaceEndpoints": [
        "ec2"
      ],
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PhzSuffix": "my-domain.cloud",
      "RedundantEndpoints": true,
      "Region": "ap-northeast-1",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpnEcmpSupport": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadHubs
404 Not Found The Stax Networking Hub cannot be found. Error

Create Networking Hub

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs', headers = headers)

print(r.json())

POST /20190206/networking/hubs


Creates Stax Networking Hub within your Stax Organisation.

Body parameter

{
  "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "AmazonSideAsn": 64512,
  "Cidr": "10.128.0.0/22",
  "CidrExclusions": [
    {
      "Cidr": "10.128.0.0/19",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Description": "datacenter exclusion",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ],
  "CidrRangeName": "myrange",
  "CreateCloudwatchVpcFlowlogs": true,
  "CreateInternetGateway": true,
  "CreateNatGateway": true,
  "CreateVirtualPrivateGateway": true,
  "Description": "This Hub is for a team ABCD applications",
  "GatewayEndpoints": [
    "s3"
  ],
  "InterfaceEndpoints": [
    "ec2"
  ],
  "Name": "prod",
  "PhzSuffix": "my-domain.cloud",
  "RedundantEndpoints": true,
  "RedundantNat": true,
  "Region": "ap-northeast-1",
  "Tags": {
    "CostCode": "12345"
  },
  "VirtualPrivateGatewayAsn": 64513,
  "VpnEcmpSupport": true
}

Parameters

Name In Type Required Description
body body networking.CreateHub true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "NetworkingHub": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateHubEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The response returned if the request is forbidden. Error
404 Not Found The account to deploy a hub does not exist. Error

Delete Networking Hub

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/hubs/{hub_id}


Deletes a hub from the Stax Organisation

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteHubEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The hub to be deleted doesn't exist or is already deleted. Error

Fetch Networking Hub

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}


Returns a list of networking hubs in your Stax Organisation.
Can use the UUID of a Hub to return a specific hub details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub.
status query string false The Hub statuses to return, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, UPDATE_IN_PROGRESS, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "Hubs": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "my-hub",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "InterfaceEndpoints": [
        "ec2"
      ],
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PhzSuffix": "my-domain.cloud",
      "RedundantEndpoints": true,
      "Region": "ap-northeast-1",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpnEcmpSupport": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadHubs
404 Not Found The Stax Networking Hub cannot be found. Error

Update Networking Hub

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}', headers = headers)

print(r.json())

PUT /20190206/networking/hubs/{hub_id}


Updates a various attributes for a given hub. Only supplied values are updated.

Body parameter

{
  "CreateCloudwatchVpcFlowlogs": true,
  "CreateInternetGateway": true,
  "CreateNatGateway": true,
  "CreateVirtualPrivateGateway": true,
  "Description": "This Hub is for connectivity from headquaters to VPC workloads",
  "GatewayEndpoints": [
    "s3"
  ],
  "InterfaceEndpoints": [
    "ec2"
  ],
  "Name": "prod",
  "PhzSuffix": "my-domain.cloud",
  "RedundantEndpoints": true,
  "RedundantNat": true,
  "Tags": {
    "CostCode": "12345"
  },
  "VirtualPrivateGatewayAsn": 64513
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub to update.
body body networking.UpdateHub true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateHubEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found An active hub to be updated does not exist Error

Fetch Hub DNS Resolvers

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/dnsresolvers', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/dnsresolvers


Returns the DNS Resolver of the Stax Networking Hub.
Providing the UUID of a Stax DNS Resolver will return a specific Stax DNS Resolver's details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub where the Stax DNS Resolver is deployed.
status query string false The Stax DNS Resolver statuses to return, comma delimited.

Detailed descriptions

status: The Stax DNS Resolver statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DnsResolvers": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "InboundIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Interfaces": 2,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "dns",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OutboundIpAddresses": [
        "192.168.0.1",
        "192.168.0.2"
      ],
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDnsResolvers
404 Not Found The Stax Networking resource cannot be found. Error

Create DNS Resolver

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/dnsresolvers', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{hub_id}/dnsresolvers


Creates a Stax DNS Resolver within a Stax Networking Hub.

Body parameter

{
  "Name": "dns",
  "NumberOfInterfaces": 2,
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub to deploy the Stax DNS Resolver.
body body networking.CreateDnsResolver true none

Example responses

200 Response

{
  "Detail": {
    "DnsResolver": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateDnsResolverEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Networking Hub to deploy the Stax DNS Resolver cannot be found. Error

Fetch Hub DX Associations

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/dxassociations', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/dxassociations


Returns all the Stax DX Asssociations.
Providing the UUID of a Stax Networking Hub will return the Stax DX Associations for the Stax Networking Hub.
Providing the UUID of a Stax DX Association will return a specific Stax DX Association's details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub to fetch associations for.
status query string false The Stax DX Association statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Association statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxAssociations": [
    {
      "AwsAssociationId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DxGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Prefixes": [
        "192.168.0.0/24",
        "192.168.1.0/24"
      ],
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxAssociations
404 Not Found The Stax Networking resource cannot be found. Error

Fetch Hub DX Gateways

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/dxgateways', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/dxgateways


Returns all the Stax DX Gateways.
Providing the UUID of a Stax Networking Hub will return the Stax DX Gateways associated to the Stax Networking Hub.
Providing the UUID of a Stax DX Gateway will return a specific Stax DX Gateway's details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub where the Stax DX Gateway is deployed.
status query string false The Stax DX Gateway statuses to return, comma delimited.

Detailed descriptions

status: The Stax DX Gateway statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "DxGateways": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "AwsGatewayId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "ExternalResource": false,
      "GatewayType": "TRANSIT",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxGateways
404 Not Found The Stax Networking resource cannot be found. Error

Fetch Hub IDR Exclusions

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/exclusions', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/exclusions


Returns a list of CIDR Exclusions.
Can use the UUID of a CIDR Exclusions to return a specific CIDR Exclusions details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub to list Exclusions in.
status query string false The Hub statuses to return, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

Example responses

200 Response

{
  "Exclusions": [
    {
      "Cidr": "10.128.0.0/19",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "datacenter exclusion",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrExclusions
404 Not Found The Stax Networking resource cannot be found. Error

Create CIDR Exclusion

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/exclusions', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{hub_id}/exclusions


Creates a CIDR Exclusion within a Stax Networking Hub

Body parameter

{
  "Cidr": "10.128.0.0/19",
  "Description": "This Reservation blocks out existing legacy VPCs",
  "Name": "legacy-vpcs",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub where the CIDR Exclusion is created in.
body body networking.CreateCidrExclusion true none

Example responses

200 Response

{
  "Exclusions": [
    {
      "Cidr": "10.128.0.0/19",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "datacenter exclusion",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrExclusions
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The hub to create the CIDR Exclusion is not found. Error

Fetch Networking Hub Prefix Lists

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/prefixlists', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/prefixlists


Providing the UUID of a Stax Networking Hub will return the Stax Prefix Lists for the Stax Networking Hub.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub to retrieve Prefix Lists for.
status query string false The Stax Prefix List statuses to return, comma delimited.

Detailed descriptions

status: The Stax Prefix List statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS

Example responses

200 Response

{
  "PrefixLists": [
    {
      "AwsPrefixListId": "string",
      "AwsTargetId": "BLACKHOLE",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Entries": [
        "192.168.0.1/32",
        "192.168.0.2/32"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "MaxEntries": 3,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "example",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PrefixListType": "HUB",
      "RouteTableTypes": [
        "INFRASTRUCTURE",
        "ISOLATED"
      ],
      "Status": "ACTIVE",
      "SubnetTypes": [
        "PRIVATE",
        "RESTRICTED"
      ],
      "Tags": {
        "CostCode": "12345"
      },
      "TargetId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TargetType": "BLACKHOLE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcIds": [
        "a7220870-40fe-4235-abb3-4d42af0336c2",
        "7e542285-8b90-4b57-81e1-96e87e5ee443"
      ],
      "VpcTypes": [
        "TRANSIT",
        "ISOLATED"
      ],
      "Zones": [
        "ZONE1",
        "ZONE2"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadPrefixLists
404 Not Found The Stax Networking resource cannot be found. Error

Create a Hub Prefix List

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/prefixlists/hubs', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{hub_id}/prefixlists/hubs


Creates a Stax Hub Prefix List.

Body parameter

{
  "Entries": [
    "192.168.0.1/32",
    "192.168.0.2/32"
  ],
  "MaxEntries": 3,
  "Name": "example",
  "RouteTableTypes": [
    "INFRASTRUCTURE",
    "ISOLATED"
  ],
  "Tags": {
    "CostCode": "12345"
  },
  "TargetId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "TargetType": "BLACKHOLE",
  "Zones": [
    "ZONE1",
    "ZONE2"
  ]
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub to create the Hub Prefix List for.
body body networking.CreateHubPrefixList true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "PrefixList": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreatePrefixListEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Networking Hub to create the Prefix List for cannot be found. Error

Create a VPC Prefix List

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/prefixlists/vpcs', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{hub_id}/prefixlists/vpcs


Creates a Stax VPC Prefix List.

Body parameter

{
  "Entries": [
    "192.168.0.1/32",
    "192.168.0.2/32"
  ],
  "MaxEntries": 3,
  "Name": "example",
  "SubnetTypes": [
    "PRIVATE",
    "RESTRICTED"
  ],
  "Tags": {
    "CostCode": "12345"
  },
  "VpcIds": [
    "a7220870-40fe-4235-abb3-4d42af0336c2",
    "7e542285-8b90-4b57-81e1-96e87e5ee443"
  ],
  "VpcTypes": [
    "TRANSIT",
    "ISOLATED"
  ],
  "Zones": [
    "ZONE1",
    "ZONE2"
  ]
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub to create the Vpc Prefix List for.
body body networking.CreateVpcPrefixList true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "PrefixList": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreatePrefixListEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Networking Hub to create the Prefix List for cannot be found. Error

Fetch Hub CIDR Ranges

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/ranges', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/ranges


Returns a list of CIDR Ranges.
Can use the UUID of a CIDR Range to return a specific CIDR Range details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub you want the Ranges for.
status query string false The Hub statuses to return, comma delimited.
id_filter query string false List of range ids to fetch, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

id_filter: List of range ids to fetch, comma delimited.

Example responses

200 Response

{
  "Ranges": [
    {
      "Cidr": "10.128.0.0/23",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DefaultCidrRange": false,
      "Description": "datacenter ranges",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastAllocationTS": "2018-10-11T01:05:45.000Z",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrRanges
404 Not Found The Stax Networking resource cannot be found. Error

Create CIDR Range

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/ranges', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{hub_id}/ranges


Creates a CIDR Range within a Stax Networking Hub

Body parameter

{
  "Cidr": "10.128.0.0/23",
  "Description": "CIDR Range used for team ABCD application 1234",
  "Name": "prod",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub where the CIDR Range is created in.
body body networking.CreateCidrRange true none

Example responses

200 Response

{
  "Ranges": [
    {
      "Cidr": "10.128.0.0/23",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DefaultCidrRange": false,
      "Description": "datacenter ranges",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastAllocationTS": "2018-10-11T01:05:45.000Z",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrRanges
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The hub to create the CIDR Range is not found. Error

Fetch Hub VPCs

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/vpcs', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/vpcs


Returns a list of VPCs.
Can use the UUID of a VPC to return a specific VPC details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub where the VPC is.
status query string false The VPC statuses to return, comma delimited.
type query string false The VPC type to return, comma delimited.

Detailed descriptions

status: The VPC statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

type: The VPC type to return, comma delimited.

Filter options available: FLAT, ISOLATED, TRANSIT, SHAREDSERVICES

Example responses

200 Response

{
  "Vpcs": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "AwsVpcId": "string",
      "Cidr": "10.128.0.0/23",
      "CidrRangeId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CreateFlowlogCwl": true,
      "CreateIgw": true,
      "CreateNat": true,
      "CreateVgw": true,
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "VPC for my particular application",
      "GatewayEndpoints": [
        "s3"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "PhzId": "PHZAAEXAMPLE",
      "PhzPrefix": "dev",
      "RedundantNat": false,
      "Region": "ap-northeast-1",
      "Size": "SMALL",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "Type": "FLAT",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VgwAsn": 64513,
      "Zone": "non-prod"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpcs
404 Not Found The Stax Networking resource cannot be found. Error

Create VPC

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/vpcs', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{hub_id}/vpcs


Creates a VPC within a Stax Networking Hub

Body parameter

{
  "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CidrRangeId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CreateCloudwatchVpcFlowlogs": true,
  "CreateInternetGateway": true,
  "CreateVirtualPrivateGateway": true,
  "Description": "VPC for a non-prod microservice",
  "GatewayEndpoints": [
    "s3"
  ],
  "Name": "dev-ms-customers",
  "PhzPrefix": "dev",
  "Region": "ap-northeast-1",
  "Size": "SMALL",
  "Tags": {
    "CostCode": "12345"
  },
  "Type": "ISOLATED",
  "VirtualPrivateGatewayAsn": 64513,
  "Zone": "my-zone"
}

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Hub where the VPC is.
body body networking.CreateVpc true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string",
    "VPC": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateVpcEvent
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The response returned if the request is forbidden. Error
404 Not Found The hub to create the VPC is not found. Error

Fetch Hub VPN Connections

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/vpnconnections', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/vpnconnections


Returns all the Stax VPN Connections.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Connections associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return the Stax VPN Connections associated to the Stax VPN Customer Gateway.
Providing the UUID of a Stax VPN Connections will return a specific Stax VPN Connections details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub where the Stax VPN Connection is deployed.
status query string false The Stax VPN Connections statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Connections statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnConnections": [
    {
      "AwsVpnConnectionId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ImprovedAcceleration": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "RoutingType": "DYNAMIC",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpnConnectionType": "HUB",
      "VpnCustomerGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnConnections
404 Not Found The Stax Networking resource cannot be found. Error

Fetch Hub VPN Customer Gateways

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{hub_id}/vpncustomergateways', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{hub_id}/vpncustomergateways


Returns all the Stax VPN Customer Gateways.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Customer Gateways associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return a specific Stax VPN Customer Gateways' details.

Parameters

Name In Type Required Description
hub_id path uuidv4 true The UUID of the Stax Networking Hub where the Stax VPN Customer Gateways is deployed.
status query string false The Stax VPN Customer Gateways statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Customer Gateways statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnCustomerGateways": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "AwsVpnCustomerGatewayId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "IpAddress": "192.168.1.0",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Region": "ap-northeast-1",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnCustomerGateways
404 Not Found The Stax Networking resource cannot be found. Error

Fetch Networking Hub Hub Peerings

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/hubs/{networking_hub_id}/hubpeerings', headers = headers)

print(r.json())

GET /20190206/networking/hubs/{networking_hub_id}/hubpeerings


Providing the UUID of a Stax Networking Hub will return the Stax Hub Peerings for the Stax Networking Hub.

Parameters

Name In Type Required Description
networking_hub_id path uuidv4 true The UUID of the Stax Networking Hub to retrieve Hub Peerings for.
status query string false The Stax Hub Peering statuses to return, comma delimited.

Detailed descriptions

status: The Stax Hub Peering statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, PENDING_ACCEPT, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS

Example responses

200 Response

{
  "HubPeerings": [
    {
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DestinationAwsAccountId": "000011112222",
      "DestinationAwsRegion": "ap-northeast-1",
      "DestinationAwsTgwId": "tgw-0000aaaa1111bbbbb",
      "DestinationNetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "DestinationTgwPeeringAttachmentId": "tgw-attach-0000aaaa1111bbbbb",
      "ExternalResource": false,
      "HubPeeringTarget": "STAX_RESOURCE",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod-Shared",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "SourceAwsAccountId": "000011112222",
      "SourceAwsRegion": "ap-northeast-1",
      "SourceAwsTgwId": "tgw-0000aaaa1111bbbbb",
      "SourceNetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "SourceTgwPeeringAttachmentId": "tgw-attach-0000aaaa1111bbbbb",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadHubPeerings
404 Not Found The Stax Networking resource cannot be found. Error

Create a Hub Peering

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/hubs/{networking_hub_id}/hubpeerings', headers = headers)

print(r.json())

POST /20190206/networking/hubs/{networking_hub_id}/hubpeerings


Creates a Stax Hub Peering.

Body parameter

{
  "DestinationAwsAccountId": "000011112222",
  "DestinationAwsRegion": "ap-northeast-1",
  "DestinationAwsTgwId": "tgw-0000aaaa1111bbbbb",
  "DestinationNetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Name": "Prod-Shared",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
networking_hub_id path uuidv4 true The UUID of the Stax Networking Hub to create the Hub Peering for.
body body networking.CreateHubPeering true none

Example responses

200 Response

{
  "Detail": {
    "HubPeering": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateHubPeeringEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Networking Hub to create the Hub Peering for cannot be found. Error

Fetch Prefix Lists

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/prefixlists', headers = headers)

print(r.json())

GET /20190206/networking/prefixlists


Returns all the Stax Prefix Lists.

Parameters

Name In Type Required Description
status query string false The Stax Prefix List statuses to return, comma delimited.

Detailed descriptions

status: The Stax Prefix List statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS

Example responses

200 Response

{
  "PrefixLists": [
    {
      "AwsPrefixListId": "string",
      "AwsTargetId": "BLACKHOLE",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Entries": [
        "192.168.0.1/32",
        "192.168.0.2/32"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "MaxEntries": 3,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "example",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PrefixListType": "HUB",
      "RouteTableTypes": [
        "INFRASTRUCTURE",
        "ISOLATED"
      ],
      "Status": "ACTIVE",
      "SubnetTypes": [
        "PRIVATE",
        "RESTRICTED"
      ],
      "Tags": {
        "CostCode": "12345"
      },
      "TargetId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TargetType": "BLACKHOLE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcIds": [
        "a7220870-40fe-4235-abb3-4d42af0336c2",
        "7e542285-8b90-4b57-81e1-96e87e5ee443"
      ],
      "VpcTypes": [
        "TRANSIT",
        "ISOLATED"
      ],
      "Zones": [
        "ZONE1",
        "ZONE2"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadPrefixLists
404 Not Found The Stax Networking resource cannot be found. Error

Update Hub Prefix List associations

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/prefixlists/hubs/{prefix_list_id}/associations', headers = headers)

print(r.json())

PUT /20190206/networking/prefixlists/hubs/{prefix_list_id}/associations


Updates a Stax Hub Prefix List associations. Only supplied values are updated.

Body parameter

{
  "RouteTableTypes": [
    "INFRASTRUCTURE",
    "ISOLATED"
  ],
  "Zones": [
    "ZONE1",
    "ZONE2"
  ]
}

Parameters

Name In Type Required Description
prefix_list_id path uuidv4 true The UUID of the Stax Prefix List to update associations for.
body body networking.UpdateHubPrefixListAssociation true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdatePrefixListAssociationEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Prefix List cannot be found. Error

Update VPC Prefix List associations

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/prefixlists/vpcs/{prefix_list_id}/associations', headers = headers)

print(r.json())

PUT /20190206/networking/prefixlists/vpcs/{prefix_list_id}/associations


Updates a Stax VPC Prefix List associations. Only supplied values are updated.

Body parameter

{
  "SubnetTypes": [
    "PRIVATE",
    "RESTRICTED"
  ],
  "VpcIds": [
    "a7220870-40fe-4235-abb3-4d42af0336c2",
    "7e542285-8b90-4b57-81e1-96e87e5ee443"
  ],
  "VpcTypes": [
    "TRANSIT",
    "ISOLATED"
  ],
  "Zones": [
    "ZONE1",
    "ZONE2"
  ]
}

Parameters

Name In Type Required Description
prefix_list_id path uuidv4 true The UUID of the Stax Prefix List to update associations for.
body body networking.UpdateVpcPrefixListAssociation true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdatePrefixListAssociationEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Prefix List cannot be found. Error

Delete Prefix List

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/prefixlists/{prefix_list_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/prefixlists/{prefix_list_id}


Deletes a Stax Prefix List.

Parameters

Name In Type Required Description
prefix_list_id path uuidv4 true The UUID of the Stax Prefix List to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeletePrefixListEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Prefix List to delete cannot be found. Error

Fetch Prefix List

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/prefixlists/{prefix_list_id}', headers = headers)

print(r.json())

GET /20190206/networking/prefixlists/{prefix_list_id}


Providing the UUID of a Stax Prefix List will return a specific Stax Prefix List.

Parameters

Name In Type Required Description
prefix_list_id path uuidv4 true The UUID of the Stax Prefix List to Read.
status query string false The Stax Prefix List statuses to return, comma delimited.

Detailed descriptions

status: The Stax Prefix List statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS

Example responses

200 Response

{
  "PrefixLists": [
    {
      "AwsPrefixListId": "string",
      "AwsTargetId": "BLACKHOLE",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Entries": [
        "192.168.0.1/32",
        "192.168.0.2/32"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "MaxEntries": 3,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "example",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PrefixListType": "HUB",
      "RouteTableTypes": [
        "INFRASTRUCTURE",
        "ISOLATED"
      ],
      "Status": "ACTIVE",
      "SubnetTypes": [
        "PRIVATE",
        "RESTRICTED"
      ],
      "Tags": {
        "CostCode": "12345"
      },
      "TargetId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TargetType": "BLACKHOLE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcIds": [
        "a7220870-40fe-4235-abb3-4d42af0336c2",
        "7e542285-8b90-4b57-81e1-96e87e5ee443"
      ],
      "VpcTypes": [
        "TRANSIT",
        "ISOLATED"
      ],
      "Zones": [
        "ZONE1",
        "ZONE2"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadPrefixLists
404 Not Found The Stax Networking resource cannot be found. Error

Update Prefix List

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/prefixlists/{prefix_list_id}', headers = headers)

print(r.json())

PUT /20190206/networking/prefixlists/{prefix_list_id}


Updates a Stax Prefix List. Only supplied values are updated.

Body parameter

{
  "Entries": [
    "192.168.0.1/32",
    "192.168.0.2/32"
  ],
  "MaxEntries": 3,
  "Name": "example",
  "Tags": {
    "CostCode": "12345"
  },
  "TargetId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "TargetType": "BLACKHOLE"
}

Parameters

Name In Type Required Description
prefix_list_id path uuidv4 true The UUID of the Stax Prefix List to update.
body body networking.UpdatePrefixList true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdatePrefixListEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Prefix List cannot be found. Error

Fetch CIDR Ranges

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/ranges', headers = headers)

print(r.json())

GET /20190206/networking/ranges


Returns a list of CIDR Ranges.
Can use the UUID of a CIDR Range to return a specific CIDR Range details.

Parameters

Name In Type Required Description
status query string false The Hub statuses to return, comma delimited.
id_filter query string false List of range ids to fetch, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

id_filter: List of range ids to fetch, comma delimited.

Example responses

200 Response

{
  "Ranges": [
    {
      "Cidr": "10.128.0.0/23",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DefaultCidrRange": false,
      "Description": "datacenter ranges",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastAllocationTS": "2018-10-11T01:05:45.000Z",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrRanges
404 Not Found The Stax Networking resource cannot be found. Error

Delete CIDR Range

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/ranges/{range_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/ranges/{range_id}


Deletes a CIDR Range within a Stax Networking Hub. No existing VPCs can be in the CIDR Range.

Parameters

Name In Type Required Description
range_id path uuidv4 true The UUID of the Range to delete.

Example responses

200 Response

{
  "Ranges": [
    {
      "Cidr": "10.128.0.0/23",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DefaultCidrRange": false,
      "Description": "datacenter ranges",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastAllocationTS": "2018-10-11T01:05:45.000Z",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrRanges
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The CIDR Range to delete cannot be found or is already deleted. Error

Fetch CIDR Range

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/ranges/{range_id}', headers = headers)

print(r.json())

GET /20190206/networking/ranges/{range_id}


Returns a list of CIDR Ranges.
Can use the UUID of a CIDR Range to return a specific CIDR Range details.

Parameters

Name In Type Required Description
range_id path uuidv4 true The UUID of the Range to read.
status query string false The Hub statuses to return, comma delimited.
id_filter query string false List of range ids to fetch, comma delimited.

Detailed descriptions

status: The Hub statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

id_filter: List of range ids to fetch, comma delimited.

Example responses

200 Response

{
  "Ranges": [
    {
      "Cidr": "10.128.0.0/23",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "DefaultCidrRange": false,
      "Description": "datacenter ranges",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastAllocationTS": "2018-10-11T01:05:45.000Z",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadCidrRanges
404 Not Found The Stax Networking resource cannot be found. Error

Update CIDR Range

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/ranges/{range_id}', headers = headers)

print(r.json())

PUT /20190206/networking/ranges/{range_id}


Updates a CIDR Range within a Stax Networking Hub

Body parameter

{
  "Description": "CIDR Range used for team ABCD application 1234",
  "Name": "prod",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
range_id path uuidv4 true The UUID of the CIDR Range to update.
body body networking.UpdateCidrRange true none

Example responses

200 Response

{
  "Description": "CIDR Range used for team ABCD application 1234",
  "Name": "prod",
  "Tags": {
    "CostCode": "12345"
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateCidrRange
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The CIDR Range to update cannot be found. Error

Fetch VPCs

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpcs', headers = headers)

print(r.json())

GET /20190206/networking/vpcs


Returns a list of VPCs.
Can use the UUID of a VPC to return a specific VPC details.

Parameters

Name In Type Required Description
status query string false The VPC statuses to return, comma delimited.
type query string false The VPC type to return, comma delimited.

Detailed descriptions

status: The VPC statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

type: The VPC type to return, comma delimited.

Filter options available: FLAT, ISOLATED, TRANSIT, SHAREDSERVICES

Example responses

200 Response

{
  "Vpcs": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "AwsVpcId": "string",
      "Cidr": "10.128.0.0/23",
      "CidrRangeId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CreateFlowlogCwl": true,
      "CreateIgw": true,
      "CreateNat": true,
      "CreateVgw": true,
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "VPC for my particular application",
      "GatewayEndpoints": [
        "s3"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "PhzId": "PHZAAEXAMPLE",
      "PhzPrefix": "dev",
      "RedundantNat": false,
      "Region": "ap-northeast-1",
      "Size": "SMALL",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "Type": "FLAT",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VgwAsn": 64513,
      "Zone": "non-prod"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpcs
404 Not Found The Stax Networking resource cannot be found. Error

Delete VPC

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/vpcs/{vpc_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/vpcs/{vpc_id}


Deletes a VPC within a Stax Networking Hub

Parameters

Name In Type Required Description
vpc_id path uuidv4 true The UUID of the VPC to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteVpcEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The VPC to delete cannot be found. Error

Fetch VPC

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpcs/{vpc_id}', headers = headers)

print(r.json())

GET /20190206/networking/vpcs/{vpc_id}


Returns a list of VPCs.
Can use the UUID of a VPC to return a specific VPC details.

Parameters

Name In Type Required Description
vpc_id path uuidv4 true The UUID of the VPC to read.
status query string false The VPC statuses to return, comma delimited.
type query string false The VPC type to return, comma delimited.

Detailed descriptions

status: The VPC statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

type: The VPC type to return, comma delimited.

Filter options available: FLAT, ISOLATED, TRANSIT, SHAREDSERVICES

Example responses

200 Response

{
  "Vpcs": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "AwsVpcId": "string",
      "Cidr": "10.128.0.0/23",
      "CidrRangeId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CreateFlowlogCwl": true,
      "CreateIgw": true,
      "CreateNat": true,
      "CreateVgw": true,
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "VPC for my particular application",
      "GatewayEndpoints": [
        "s3"
      ],
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "non-prod",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "PhzId": "PHZAAEXAMPLE",
      "PhzPrefix": "dev",
      "RedundantNat": false,
      "Region": "ap-northeast-1",
      "Size": "SMALL",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "Type": "FLAT",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VgwAsn": 64513,
      "Zone": "non-prod"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpcs
404 Not Found The Stax Networking resource cannot be found. Error

Update VPC

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/vpcs/{vpc_id}', headers = headers)

print(r.json())

PUT /20190206/networking/vpcs/{vpc_id}


Updates a VPC within a Stax Networking Hub

Body parameter

{
  "CreateCloudwatchVpcFlowlogs": true,
  "CreateInternetGateway": true,
  "CreateVirtualPrivateGateway": true,
  "Description": "string",
  "GatewayEndpoints": [
    "s3"
  ],
  "Name": "prod",
  "PhzPrefix": "dev",
  "Tags": {
    "CostCode": "12345"
  },
  "VirtualPrivateGatewayAsn": 64513
}

Parameters

Name In Type Required Description
vpc_id path uuidv4 true The UUID of the VPC to update.
body body networking.UpdateVpc true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateVpcEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The VPC to update cannot be found. Error

Fetch VPN Connections

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpnconnections', headers = headers)

print(r.json())

GET /20190206/networking/vpnconnections


Returns all the Stax VPN Connections.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Connections associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return the Stax VPN Connections associated to the Stax VPN Customer Gateway.
Providing the UUID of a Stax VPN Connections will return a specific Stax VPN Connections details.

Parameters

Name In Type Required Description
status query string false The Stax VPN Connections statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Connections statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnConnections": [
    {
      "AwsVpnConnectionId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ImprovedAcceleration": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "RoutingType": "DYNAMIC",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpnConnectionType": "HUB",
      "VpnCustomerGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnConnections
404 Not Found The Stax Networking resource cannot be found. Error

Delete VPN Conection

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/vpnconnections/{vpn_connection_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/vpnconnections/{vpn_connection_id}


Deletes a Stax VPN Conection within a Stax VPN Customer Gateway

Parameters

Name In Type Required Description
vpn_connection_id path uuidv4 true The UUID of the Stax VPN Conection.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteVpnConnectionEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax VPN Conection to delete cannot be found. Error

Fetch VPN Connection

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpnconnections/{vpn_connection_id}', headers = headers)

print(r.json())

GET /20190206/networking/vpnconnections/{vpn_connection_id}


Returns all the Stax VPN Connections.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Connections associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return the Stax VPN Connections associated to the Stax VPN Customer Gateway.
Providing the UUID of a Stax VPN Connections will return a specific Stax VPN Connections details.

Parameters

Name In Type Required Description
vpn_connection_id path uuidv4 true The UUID of the Stax VPN Connection to fetch.
status query string false The Stax VPN Connections statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Connections statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnConnections": [
    {
      "AwsVpnConnectionId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ImprovedAcceleration": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "RoutingType": "DYNAMIC",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpnConnectionType": "HUB",
      "VpnCustomerGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnConnections
404 Not Found The Stax Networking resource cannot be found. Error

Update VPN Conection

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/vpnconnections/{vpn_connection_id}', headers = headers)

print(r.json())

PUT /20190206/networking/vpnconnections/{vpn_connection_id}


Updates the attributes for a given Stax VPN Connection. Only supplied values are updated.

Body parameter

{
  "Name": "new-vpn-gw",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
vpn_connection_id path uuidv4 true The UUID of the Stax VPN Connection to update.
body body networking.UpdateVpnConnection true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateVpnConnectionEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax VPN Connection to update cannot be found. Error

Fetch VPN Connection Status

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpnconnections/{vpn_connection_id}/status', headers = headers)

print(r.json())

GET /20190206/networking/vpnconnections/{vpn_connection_id}/status


Returns the connectivity status of the VPN Tunnels for a specific VPN Connection

Parameters

Name In Type Required Description
vpn_connection_id path uuidv4 true The UUID of the Stax VPN Connection.

Example responses

200 Response

{
  "VpnConnectionStatus": [
    {
      "TunnelName": "VPN Tunnel",
      "TunnelStatus": "up"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnConnectionStatus
404 Not Found The Stax VPN Connection cannot be found. Error

Fetch VPN Customer Gateways

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways', headers = headers)

print(r.json())

GET /20190206/networking/vpncustomergateways


Returns all the Stax VPN Customer Gateways.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Customer Gateways associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return a specific Stax VPN Customer Gateways' details.

Parameters

Name In Type Required Description
status query string false The Stax VPN Customer Gateways statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Customer Gateways statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnCustomerGateways": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "AwsVpnCustomerGatewayId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "IpAddress": "192.168.1.0",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Region": "ap-northeast-1",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnCustomerGateways
404 Not Found The Stax Networking resource cannot be found. Error

Creates a Stax VPN Customer Gateway

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways', headers = headers)

print(r.json())

POST /20190206/networking/vpncustomergateways

Body parameter

{
  "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "Asn": 64513,
  "IpAddress": "1.1.1.1",
  "Name": "vpn-gw",
  "Region": "ap-northeast-1",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
body body networking.CreateVpnCustomerGateway true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string",
    "VpnCustomerGateway": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateVpnCustomerGatewayEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Resource to deploy the VPN Customer Gateway into cannot be found. Error

Delete a Stax VPN Customer Gateway

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}', headers = headers)

print(r.json())

DELETE /20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}

Parameters

Name In Type Required Description
vpn_customer_gateway_id path uuidv4 true The UUID of the VPN Customer Gateway to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.DeleteVpnCustomerGatewayEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The VPN Customer Gateway to be deleted doesn't exist or is already deleted. Error

Fetch VPN Customer Gateway

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}', headers = headers)

print(r.json())

GET /20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}


Returns all the Stax VPN Customer Gateways.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Customer Gateways associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return a specific Stax VPN Customer Gateways' details.

Parameters

Name In Type Required Description
vpn_customer_gateway_id path uuidv4 true The UUID of the Stax VPN Customer Gateways to fetch.
status query string false The Stax VPN Customer Gateways statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Customer Gateways statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnCustomerGateways": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Asn": 64512,
      "AwsVpnCustomerGatewayId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "IpAddress": "192.168.1.0",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Region": "ap-northeast-1",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnCustomerGateways
404 Not Found The Stax Networking resource cannot be found. Error

Updates a Stax VPN Customer Gateway

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}', headers = headers)

print(r.json())

PUT /20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}


Body parameter

{
  "Name": "vpn-gw",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
vpn_customer_gateway_id path uuidv4 true The UUID of the Stax VPN Customer Gateway to update.
body body networking.UpdateVpnCustomerGateway true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.UpdateVpnCustomerGatewayEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax VPN Customer Gateway to update cannot be found. Error

Create VPN Connection

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}/vpnconnection', headers = headers)

print(r.json())

POST /20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}/vpnconnection


Creates a Stax VPN Connection between a Stax Networking Hub or Stax VPC and a Stax VPN Customer Gateway.

Providing a Networking Hub Id will attempt to create a VPN Connection for the VPN Customer Gateway and a Transit Gateway

Providing a VPC ID ill attempt to create a VPN Connection for the VPN Customer Gateway and a VPC's Virtual Private Gateway.

Body parameter

{
  "ImprovedAcceleration": false,
  "Name": "vpn-transit-connection",
  "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "RoutingType": "DYNAMIC",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
vpn_customer_gateway_id path uuidv4 true The UUID of the Stax VPN Connection to association with a Stax Networking Hub.
body body networking.CreateVpnConnection true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string",
    "VpnConnection": {
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.CreateVpnConnectionEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Resources to create the VPN Connection for cannot be found. Error

Fetch Gateway VPN Connections

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}/vpnconnections', headers = headers)

print(r.json())

GET /20190206/networking/vpncustomergateways/{vpn_customer_gateway_id}/vpnconnections


Returns all the Stax VPN Connections.
Providing the UUID of a Stax Networking Hub will return the Stax VPN Connections associated to the Stax Networking Hub.
Providing the UUID of a Stax VPN Customer Gateway will return the Stax VPN Connections associated to the Stax VPN Customer Gateway.
Providing the UUID of a Stax VPN Connections will return a specific Stax VPN Connections details.

Parameters

Name In Type Required Description
vpn_customer_gateway_id path uuidv4 true The UUID of the Stax VPN Customer Gateways to fetch.
status query string false The Stax VPN Connections statuses to return, comma delimited.

Detailed descriptions

status: The Stax VPN Connections statuses to return, comma delimited.

Filter options available: ACTIVE, CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED

Example responses

200 Response

{
  "VpnConnections": [
    {
      "AwsVpnConnectionId": "string",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ImprovedAcceleration": false,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "Prod Gateway",
      "NetworkingHubId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "RoutingType": "DYNAMIC",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpcId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "VpnConnectionType": "HUB",
      "VpnCustomerGatewayId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadVpnConnections
404 Not Found The Stax Networking resource cannot be found. Error

Fetch DX Connections

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/networking/{account_id}/dxconnections', headers = headers)

print(r.json())

GET /20190206/networking/{account_id}/dxconnections


Returns all DX Connections for the specified Stax Account Id.

Parameters

Name In Type Required Description
account_id path uuidv4 true The UUID of the Stax Account that contains a Direct Connect connection.
state query string false The Direct Connect Connection states to return, comma delimited.

Detailed descriptions

state: The Direct Connect Connection states to return, comma delimited.

Filter options available: ordering,requested,pending,available,down,deleting,deleted,rejected,unknown

Example responses

200 Response

{
  "DxConnections": [
    {
      "Bandwidth": "50Mbps",
      "ConnectionId": "dxcon-abcdefgh",
      "ConnectionName": "SY4",
      "ConnectionState": "available",
      "Region": "ap-northeast-1",
      "Vlan": 4000
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. networking.ReadDxConnections
404 Not Found The Stax Account cannot be found. Error

Organisations

A Stax Organisation is an instance of Stax which houses your AWS Accounts, Workloads and Users.

Fetch Stax Organisations

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/organisations', headers = headers)

print(r.json())

GET /20190206/organisations

Return a list of your Stax Organisations.
A Stax Organisation is an instance of Stax which houses your AWS Accounts, Workloads and IDAM Users.

Example responses

200 Response

{
  "Organisations": [
    {
      "Alias": "my-stax-org",
      "AllowedDomains": [
        "@example.com",
        "@stax.io"
      ],
      "AttachedPolicies": [
        "e893d7e0-9306-11e9-bc42-526af7764f64"
      ],
      "AwsAccountEmailTemplate": "stax.user+${Stax::AccountId}@example.com",
      "AwsPartnerSupport": true,
      "AwsSupportType": "ENTERPRISE",
      "ComplianceType": "PCI",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ExternalStaxId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Features": {},
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "default",
      "Region": "ap-northeast-1",
      "Regions": [
        "ap-southeast-2",
        "us-east-1"
      ],
      "SpotlightSsoURL": "string",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. The response body contains an Organisation array. organisations.ReadOrganisations

Fetch Stax Organisation

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/organisations/current', headers = headers)

print(r.json())

GET /20190206/organisations/current

Return the current users Organisation.
A Stax Organisation is an instance of Stax which houses your AWS Accounts, Workloads and IDAM Users.

Example responses

200 Response

{
  "Organisations": [
    {
      "Alias": "my-stax-org",
      "AllowedDomains": [
        "@example.com",
        "@stax.io"
      ],
      "AttachedPolicies": [
        "e893d7e0-9306-11e9-bc42-526af7764f64"
      ],
      "AwsAccountEmailTemplate": "stax.user+${Stax::AccountId}@example.com",
      "AwsPartnerSupport": true,
      "AwsSupportType": "ENTERPRISE",
      "ComplianceType": "PCI",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ExternalStaxId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Features": {},
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "default",
      "Region": "ap-northeast-1",
      "Regions": [
        "ap-southeast-2",
        "us-east-1"
      ],
      "SpotlightSsoURL": "string",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. The response body contains an Organisation array. organisations.ReadOrganisations

Policies

Stax Policies are AWS Service Control Policies that can be attached to a Stax Organization or an Account Type.

Fetch Policies

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/policies', headers = headers)

print(r.json())

GET /20190206/policies

Return all Policies in your Stax Organisation.

Parameters

Name In Type Required Description
status query string false The Stax Policy statuses to return, comma delimited.

Detailed descriptions

status: The Stax Policy statuses to return, comma delimited.

Filter options available: ACTIVE, DELETED

Example responses

200 Response

{
  "Policies": [
    {
      "AwsId": "dc1a70bd-642f-41c6-9aa5-50b65e7d592e",
      "Content": {},
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "A Service Control Policy that denies access to all.",
      "ExternalResource": false,
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "DenyAll",
      "OrganisationAttachment": {
        "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "CreatedTS": "2018-10-11T01:05:45.000Z",
        "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "ModifiedTS": "2018-10-11T01:05:45.000Z",
        "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "PolicyId": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "Status": "ACTIVE",
        "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
      },
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PolicyOwner": "ORGANISATION",
      "PolicyType": "SCP",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.ReadPolicies

Create Policy

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/policies', headers = headers)

print(r.json())

POST /20190206/policies

Create a Policy in your Stax Organisation.

Body parameter

{
  "Description": "A service control policy that denies access to all.",
  "Name": "DenyAll",
  "Policy": "string",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
body body policies.CreatePolicy false none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Policy": {
      "PolicyId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.CreatePolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error

Detach Policy

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/policies/attachments/{policy_attachment_id}', headers = headers)

print(r.json())

DELETE /20190206/policies/attachments/{policy_attachment_id}

Detach a Policy from an Organisational Unit or Account.

Parameters

Name In Type Required Description
policy_attachment_id path string true The UUID of the PolicyAttachment to detach.

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "PolicyAttachment": {
      "PolicyAttachmentId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.DetachPolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the Policy Attachment to detach cannot be found. Error

Detach Policy from Organisation

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/policies/organisation/{policy_id}', headers = headers)

print(r.json())

DELETE /20190206/policies/organisation/{policy_id}

Detach a Policy from your Stax Organisation.
The policy will no longer apply to all Account Types within the Organisation.

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to detach.

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. organisations.DetachPolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Policy to detach cannot be found. Error

Attach Policy to Organisation

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/policies/organisation/{policy_id}', headers = headers)

print(r.json())

PUT /20190206/policies/organisation/{policy_id}

Attach a Policy to your Stax Organisation.
The policy will apply to all Account Types within the Organisation.

Body parameter

{
  "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
}

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to attach.
body body organisations.AttachPolicy true none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. organisations.AttachPolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Policy to attach cannot be found. Error

Delete Policy

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/policies/{policy_id}', headers = headers)

print(r.json())

DELETE /20190206/policies/{policy_id}

Delete a Policy from your Stax Organisation.

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Policy": {
      "PolicyId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.DeletePolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Policy to delete cannot be found. Error

Fetch Policy

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/policies/{policy_id}', headers = headers)

print(r.json())

GET /20190206/policies/{policy_id}

Return all Policies in your Stax Organisation.
Optionally, return the requested Policy.

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to return.

Example responses

200 Response

{
  "Policies": [
    {
      "AwsId": "dc1a70bd-642f-41c6-9aa5-50b65e7d592e",
      "Content": {},
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "A Service Control Policy that denies access to all.",
      "ExternalResource": false,
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "DenyAll",
      "OrganisationAttachment": {
        "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "CreatedTS": "2018-10-11T01:05:45.000Z",
        "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "ModifiedTS": "2018-10-11T01:05:45.000Z",
        "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "PolicyId": "e893d7e0-9306-11e9-bc42-526af7764f64",
        "Status": "ACTIVE",
        "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
      },
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PolicyOwner": "ORGANISATION",
      "PolicyType": "SCP",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.ReadPolicies

Update Policy

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/policies/{policy_id}', headers = headers)

print(r.json())

PUT /20190206/policies/{policy_id}

Update an existing Policy within your Stax Organisation.

Body parameter

{
  "Description": "A service control policy that denies access to all.",
  "Name": "DenyAll",
  "Policy": "string",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to update.
body body policies.UpdatePolicy false none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Policy": {
      "PolicyId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.UpdatePolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The Stax Policy to update cannot be found. Error

Fetch Policy Attachments

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/policies/{policy_id}/attachments', headers = headers)

print(r.json())

GET /20190206/policies/{policy_id}/attachments

Return all attachments for the Policy in your Stax Organisation.

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to return attachments for.

Example responses

200 Response

{
  "PolicyAttachments": [
    {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "PolicyAttachmentType": "ORGANISATIONAL_UNIT",
      "PolicyId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.ReadPolicyAttachments
400 Bad Request The response returned if the request is unsuccessful. Error

Attach Policy

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/policies/{policy_id}/attachments', headers = headers)

print(r.json())

POST /20190206/policies/{policy_id}/attachments

Attach a Policy to an Organisational Unit or Account.

Body parameter

{
  "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "OrganisationalUnitId": "e893d7e0-9306-11e9-bc42-526af7764f64"
}

Parameters

Name In Type Required Description
policy_id path string true The UUID of the Policy to attach.
body body policies.AttachPolicy false none

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "PolicyAttachment": {
      "PolicyAttachmentId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    },
    "Severity": "string",
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. policies.AttachPolicyEvent
400 Bad Request The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the Policy to attach cannot be found. Error

Public

Stax public discovery.

Check Alias availability

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/public/check-alias/{alias}', headers = headers)

print(r.json())

GET /20190206/public/check-alias/{alias}

Check if an Alias is available or if it is already in use by another Stax customer.
The Alias is the unique identifier for a Customer's Stax Organisation.

Parameters

Name In Type Required Description
alias path string true A unique string containing characters a-z, 0-9.

Detailed descriptions

alias: A unique string containing characters a-z, 0-9. Hyphens can also be used, but not at the start or end of the alias.

Example responses

200 Response

{
  "Alias": {
    "Status": "The company alias provided is available"
  }
}

Responses

Status Meaning Description Schema
200 OK The response returned if the Alias is available and not in use by another Customer. public.CheckAlias
409 Conflict The Alias is already in use by another Customer. public.CheckAlias

Fetch public config

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/public/config', headers = headers)

print(r.json())

GET /20190206/public/config

This is an unauthenticated endpoint returning your configuration variables which are required to authenticate API requests.

Example responses

200 Response

{
  "API": {
    "endpoints": [
      {
        "endpoint": "string",
        "name": "string",
        "region": "ap-northeast-1"
      }
    ]
  },
  "Analytics": {
    "disable": true
  },
  "ApiAuth": {
    "identityPoolId": "string",
    "mandatorySignIn": true,
    "region": "ap-northeast-1",
    "userPoolId": "string",
    "userPoolWebClientId": "string"
  },
  "AppSync": {
    "analytics": {
      "endpoint": "string",
      "region": "ap-northeast-1"
    },
    "core": {
      "endpoint": "string",
      "region": "ap-northeast-1"
    },
    "graphqlEndpoint": "string",
    "region": "ap-northeast-1"
  },
  "Auth": {
    "identityPoolId": "string",
    "mandatorySignIn": true,
    "region": "ap-northeast-1",
    "userPoolId": "string",
    "userPoolWebClientId": "string"
  },
  "Features": [
    "string"
  ],
  "Juma": {
    "controlplaneRegion": "ap-northeast-1",
    "domainName": "string",
    "fullDomainName": "string",
    "masterAccountId": 0,
    "stage": "string"
  },
  "JumaAuth": {
    "identityPoolId": "string",
    "mandatorySignIn": true,
    "region": "ap-northeast-1",
    "userPoolId": "string",
    "userPoolWebClientId": "string"
  },
  "Segment": {
    "key": "string"
  },
  "Sentry": {
    "dsn": "string",
    "projectName": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Configuration values required to authenicate API requests. public.ReadConfig

Tasks

Stax Tasks enables you to monitor async operations.

Fetch status of Task

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/task/{task_id}', headers = headers)

print(r.json())

GET /20190206/task/{task_id}

Return the status of the requested Task.
A Task may relate to an Account, User, Workload, Organisation or Log Event.

Parameters

Name In Type Required Description
task_id path string true The UUID of the Task to return.

Example responses

200 Response

{
  "Accounts": [
    "e893d7e0-9306-11e9-bc42-526af7764f64"
  ],
  "Logs": [
    "string"
  ],
  "Status": "STARTED",
  "Users": [
    "e893d7e0-9306-11e9-bc42-526af7764f64"
  ],
  "Workloads": [
    "e893d7e0-9306-11e9-bc42-526af7764f64"
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned for a valid Task. tasks.ReadTask
404 Not Found The response returned if the requested Task could not be found. Error

Team

Stax Users can be granted different levels of access to both Stax itself, and to the AWS accounts managed by Stax.

Fetch API Tokens

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/api-tokens', headers = headers)

print(r.json())

GET /20190206/api-tokens

Return a list of all API Tokens within your Stax Organisation.

Parameters

Name In Type Required Description
id_filter query string false List of Access Keys you want returned, comma delimited.
status query string false List of API Token statuses you want returned, comma delimited.

Detailed descriptions

status: List of API Token statuses you want returned, comma delimited.

Filter Options available: ACTIVE, DELETED

Example responses

200 Response

{
  "ApiTokens": [
    {
      "AccessKey": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "This token is for deployment pipelines in Gitlab to deploy to dev/test environments",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "gitlab-cicd",
      "Role": "api_admin",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadApiTokens

Create API Token

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/api-tokens', headers = headers)

print(r.json())

POST /20190206/api-tokens

Create an API Token for API/SDK access within your Stax Organisation.

Body parameter

{
  "Description": "This token is for deployment pipelines in Gitlab to deploy to dev/test environments",
  "Name": "gitlab-cicd",
  "Role": "api_admin",
  "StoreToken": true,
  "Tags": {
    "CostCode": "12345"
  },
  "TokenKeyId": "alias/my-custom-key"
}

Parameters

Name In Type Required Description
body body teams.CreateApiToken true none

Example responses

200 Response

{
  "ApiTokens": [
    {
      "AccessKey": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "This token is for deployment pipelines in Gitlab to deploy to dev environments",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "gitlab-cicd",
      "Role": "api_admin",
      "SecretKey": "stringstringstringstringstringst",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.CreateApiTokenResponse
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The response returned if there is insufficient permissions to grant the requested role. Error

Delete API Token

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/api-tokens/{AccessKey}', headers = headers)

print(r.json())

DELETE /20190206/api-tokens/{AccessKey}

Delete an API Token from your Stax Organisation.

Parameters

Name In Type Required Description
AccessKey path string true The UUID of the User to delete.

Example responses

200 Response

{
  "ApiTokens": [
    {
      "AccessKey": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "This token is for deployment pipelines in Gitlab to deploy to dev/test environments",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "gitlab-cicd",
      "Role": "api_admin",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.DeleteApiTokenResponse
404 Not Found The response returned if the request is unable to find the API Token to delete. Error

Fetch API Token

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/api-tokens/{AccessKey}', headers = headers)

print(r.json())

GET /20190206/api-tokens/{AccessKey}

Return a list of all API Tokens within your Stax Organisation.

Parameters

Name In Type Required Description
AccessKey path string true The UUID of the Token to return.
id_filter query string false List of Access Keys you want returned, comma delimited.
status query string false List of API Token statuses you want returned, comma delimited.

Detailed descriptions

status: List of API Token statuses you want returned, comma delimited.

Filter Options available: ACTIVE, DELETED

Example responses

200 Response

{
  "ApiTokens": [
    {
      "AccessKey": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "This token is for deployment pipelines in Gitlab to deploy to dev/test environments",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "gitlab-cicd",
      "Role": "api_admin",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadApiTokens

Update API Token

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/api-tokens/{AccessKey}', headers = headers)

print(r.json())

PUT /20190206/api-tokens/{AccessKey}

Update a Token for API/SDK access within your Stax Organisation.

Body parameter

{
  "Description": "This token is for deployment pipelines in Gitlab to deploy to dev/test environments",
  "Role": "api_admin",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
AccessKey path string true The UUID of the API Token to update.
body body teams.UpdateApiToken true none

Example responses

200 Response

{
  "ApiTokens": [
    {
      "AccessKey": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "This token is for deployment pipelines in Gitlab to deploy to dev/test environments",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "gitlab-cicd",
      "Role": "api_admin",
      "Status": "ACTIVE",
      "Tags": {
        "CostCode": "12345"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.UpdateApiTokenResponse
400 Bad Request The response returned if the request is unsuccessful. Error
403 Forbidden The response returned if there is insufficient permissions to grant the requested role. Error
404 Not Found The response returned if the request is unable to find the API Token to update. Error

Create Stax User

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/idam/user', headers = headers)

print(r.json())

POST /20190206/idam/user

Create a new Stax user within your Stax Organisation.
Stax Users have permission to access the AWS Console/CLI for AWS Accounts that exist within a Stax Organisation.

Body parameter

{
  "Email": "stax.user@example.com",
  "FirstName": "John",
  "LastName": "Doe",
  "Role": "customer_admin"
}

Parameters

Name In Type Required Description
body body teams.CreateUser true none

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.CreateUserEvent
403 Forbidden The response returned if the request is unsuccessful. Error

Re-invite Stax user

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/idam/user/resend-invite/{user_id}', headers = headers)

print(r.json())

PUT /20190206/idam/user/resend-invite/{user_id}

Re-send the verification email for a Stax User.

Parameters

Name In Type Required Description
user_id path string true The UUID of the IDAM User to re-invite.

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.UpdateUserInviteEvent
400 Bad Request The response returned if the user has already verified their email address. Error
404 Not Found The response returned if the user does not exist in IDAM. Error

Reset Stax User's password

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/idam/user/reset-password/{user_id}', headers = headers)

print(r.json())

PUT /20190206/idam/user/reset-password/{user_id}

Send a Stax User a password reset email.

Parameters

Name In Type Required Description
user_id path string true The UUID of the IDAM User to have password reset.

Example responses

200 Response

{
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.UpdateUserPasswordEvent
403 Forbidden The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the user does not exist in IDAM or is deleted. Error

Update Stax User

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/idam/user/{user_id}', headers = headers)

print(r.json())

PUT /20190206/idam/user/{user_id}

Update a Stax User's details, such as the name, role or email.
A DISABLED user can only be updated to ACTIVE, updating other attributes will result in a 400

Body parameter

{
  "Email": "stax.user@example.com",
  "FirstName": "John",
  "LastName": "Doe",
  "Role": "customer_admin",
  "Status": "ACTIVE"
}

Parameters

Name In Type Required Description
user_id path string true The UUID of the IDAM User to update.
body body teams.UpdateUser true none

Example responses

200 Response

{
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Message": "string",
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string"
  },
  "DetailType": "string",
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.UpdateUserEvent
400 Bad Request Only status can be updated on a disabled user. Error
403 Forbidden The response returned if the request is unsuccessful. Error
404 Not Found The response returned if the user does not exist in IDAM. Error

Fetch Stax Users and Federated Users

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/users', headers = headers)

print(r.json())

GET /20190206/users

Return a list of all Users within your Stax Organisation.
To retrieve DELETED users, include the DELETED status in the status_filter.
Optionally, return the requested Users by supplying an id_filter.

Parameters

Name In Type Required Description
filter query string false List of Users filtered by auth origin, comma delimited.
id_filter query string false List of User IDs you want returned, comma delimited.
status_filter query string false List of Users filtered by Status, comma delimited.

Detailed descriptions

filter: List of Users filtered by auth origin, comma delimited.

Filter Options available: Team, Federated

status_filter: List of Users filtered by Status, comma delimited.

Filter Options available: ACTIVE, NEW, INVITED, DISABLED, DELETED

Defaults to: ACTIVE,NEW,INVITED,DISABLED

Example responses

200 Response

{
  "Users": [
    {
      "AuthOrigin": "idam",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Email": "stax.user@example.com",
      "FirstName": "John",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastName": "Doe",
      "MFAEnabled": true,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "John Doe",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Role": "customer_admin",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadUsers
400 Bad Request The response returned if the request is unsuccessful due to user input. Error

Fetch Current User

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/users/me', headers = headers)

print(r.json())

GET /20190206/users/me

Returns the current logged in User.

Example responses

200 Response

{
  "Users": [
    {
      "AuthOrigin": "idam",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Email": "stax.user@example.com",
      "FirstName": "John",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastName": "Doe",
      "MFAEnabled": true,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "John Doe",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Role": "customer_admin",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadUsers
404 Not Found User not found. Error

Delete Stax User

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/users/{user_id}', headers = headers)

print(r.json())

DELETE /20190206/users/{user_id}

Delete a Stax User from your Stax Organisation.

Parameters

Name In Type Required Description
user_id path string true The UUID of the User to delete.

Example responses

200 Response

{
  "Users": [
    {
      "AuthOrigin": "idam",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Email": "stax.user@example.com",
      "FirstName": "John",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastName": "Doe",
      "MFAEnabled": true,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "John Doe",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Role": "customer_admin",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.DeleteUserResponse
404 Not Found User not found. Error

Fetch Stax User or Federated User

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/users/{user_id}', headers = headers)

print(r.json())

GET /20190206/users/{user_id}

Return the requested User.
Attempting to fetch a DELETED user will always return User not found.

Parameters

Name In Type Required Description
user_id path string true The UUID of the User to return.

Example responses

200 Response

{
  "Users": [
    {
      "AuthOrigin": "idam",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Email": "stax.user@example.com",
      "FirstName": "John",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "LastName": "Doe",
      "MFAEnabled": true,
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "John Doe",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Role": "customer_admin",
      "Status": "ACTIVE",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. teams.ReadUsers
404 Not Found User not found. Error

Workloads

Stax Workloads are packages of infrastructure-as-code that can be deployed to one or more AWS accounts from a single location.

Fetch Workload Catalogue Items

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workload-catalogue', headers = headers)

print(r.json())

GET /20190206/workload-catalogue

Return all Workload Catalogue Items within your Stax Organisation.
Optionally, return the requested Workload Catalogue Item.

Parameters

Name In Type Required Description
name query string false The Name of the Workload Catalogue Items to return.
filter query string false List of Workload Catalogue Item statuses you want returned, comma delimited.
id_filter query string false List of Workload Catalogue Item IDs you want returned, comma delimited.
offset query integer false Pagination - The page number to return.
limit query integer false Pagination - The number of items per page to return.
sort query string false The field to sort on.
sort_order query string false The sort order - up or down.
include_versions query boolean false Do you want all Versions?
include_parameters query boolean false Do you want the Parameter dictionary?
include_tags query boolean false Do you want all the Tags?

Detailed descriptions

filter: List of Workload Catalogue Item statuses you want returned, comma delimited.

Filter options available: STARTED, RUNNING, SUCCEEDED, FAILED, TIMED_OUT, ABORTED.

Enumerated Values

Parameter Value
sort Id
sort Name
sort Description
sort Status
sort OrganisationId
sort Public
sort CreatedTS
sort CreatedBy
sort ModifiedTS
sort UserTaskId
sort CatalogueVersionId
sort Protection
sort_order ASC
sort_order DESC

Example responses

200 Response

{
  "WorkloadCatalogues": [
    {
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Paging": {
        "NextOffset": 20,
        "PrevOffset": null,
        "Total": 100
      },
      "WorkloadCatalogueItems": [
        {
          "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "CreatedTS": "2018-10-11T01:05:45.000Z",
          "Description": "A Workload to build a VPC in my org",
          "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "ModifiedTS": "2018-10-11T01:05:45.000Z",
          "Name": "my-directory-service",
          "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
          "Protection": false,
          "Public": false,
          "Status": "NEW",
          "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "Versions": [
            {
              "CatalogueId": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "CreatedTS": "2018-10-11T01:05:45.000Z",
              "Description": "A Workload to build a VPC in my org",
              "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
              "ModifiedTS": "2018-10-11T01:05:45.000Z",
              "Outputs": [
                "bread"
              ],
              "Parameters": [
                {
                  "CostCode": "12345",
                  "Dept": "Marketing"
                }
              ],
              "Public": false,
              "Status": "NEW",
              "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "WorkloadVersion": "0.01"
            }
          ]
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. workloads.ReadCatalogueItems
400 Bad Request The response returned if an invalid ID is entered. Error
404 Not Found The response returned if no catalogue is found. Error

Create Workload Catalogue Item

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/workload-catalogue', headers = headers)

print(r.json())

POST /20190206/workload-catalogue

Create a new Workload Catalogue Item within your Stax Organisation.

Body parameter

{
  "Description": "A Workload to build a VPC in my org",
  "ManifestBody": "Resources:\n    - VPC:\n        Type: AWS::Cloudformation\n        TemplateURL: s3://{JumaArtifactBucket}/workload-vpc/vpc-2-tier-no-NAT.yml\n",
  "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
  "Name": "my-directory-service",
  "Parameters": {
    "CostCode": "12345",
    "Dept": "Marketing"
  },
  "Tags": {
    "CostCode": "12345"
  },
  "Version": "1.0.2"
}

Parameters

Name In Type Required Description
body body workloads.CreateCatalogueItem true none

Example responses

200 Response

{
  "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string",
    "WorkloadCatalogueItem": {
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "A Workload to build a VPC in my org",
      "Id": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "ManifestBody": "string",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "my-directory-service",
      "Operation": "CREATE",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Public": false,
      "Status": "NEW",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Version": "string"
    }
  },
  "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "TraceId": "string",
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. CreateCatalogueEvent
400 Bad Request The response returned if the catalogue manifest is invalid. Error
403 Forbidden The response returned if the request is unsuccessful. Error

Fetch Workload Catalogue Manifest

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workload-catalogue/manifest/{version_id}', headers = headers)

print(r.json())

GET /20190206/workload-catalogue/manifest/{version_id}

Return a Workload Catalogue Manifest

Parameters

Name In Type Required Description
version_id path string true The UUID of the Catalogue Version

Example responses

200 Response

{
  "url": "string"
}

Responses

Status Meaning Description Schema
200 OK Returns the presigned url for the manifest file workloads.ReadCatalogueManifest
400 Bad Request The response returned if an invalid ID is entered. Error
404 Not Found The Workload Catalogue Version ID can not be found or does not belong to the user. Error

Fetch Workload Catalogue Cloudformation Template

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workload-catalogue/template/{version_id}/{name}', headers = headers)

print(r.json())

GET /20190206/workload-catalogue/template/{version_id}/{name}

Return a specific Workload Catalogue Cloudformation Template

Parameters

Name In Type Required Description
version_id path string true The UUID of the Catalogue Version
name path string true Retrieve the Cloudformation with this Resource Name.

Example responses

200 Response

{
  "url": "string"
}

Responses

Status Meaning Description Schema
200 OK Returns the presigned url to retrieve the template workloads.ReadCatalogueTemplate
400 Bad Request The response returned if an invalid ID is entered. Error
403 Forbidden The response returned if the request is not successful. Error
404 Not Found The response returned if the request is not successful. Error

Delete Workload Catalogue Item

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/workload-catalogue/{catalogue_id}', headers = headers)

print(r.json())

DELETE /20190206/workload-catalogue/{catalogue_id}

Delete a Workload Catalogue Item from your Stax Organisation.
Existing Workloads launched from this Catalogue will not be deleted.

Parameters

Name In Type Required Description
catalogue_id path string true The UUID of the Catalogue Item to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string",
    "WorkloadCatalogueItem": {
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "A Workload to build a VPC in my org",
      "Id": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "ManifestBody": "string",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "my-directory-service",
      "Operation": "CREATE",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Public": false,
      "Status": "NEW",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Version": "string"
    }
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. DeleteCatalogueEvent
400 Bad Request The Workload Catalogue can not be deleted due to running workloads. Error
403 Forbidden The Workload Catalogue is Protected. Protection must be disabled before you can delete it. Error
404 Not Found The Workload Catalog ID can not be found or does not belong to the user. Error

Fetch Workload Catalogue Item

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workload-catalogue/{catalogue_id}', headers = headers)

print(r.json())

GET /20190206/workload-catalogue/{catalogue_id}

Return all Workload Catalogue Items within your Stax Organisation.
Optionally, return the requested Workload Catalogue Item.

Parameters

Name In Type Required Description
catalogue_id path string true The UUID of the Catalogue Item to return.
name query string false The Name of the Workload Catalogue Items to return.
filter query string false List of Workload Catalogue Item statuses you want returned, comma delimited.
id_filter query string false List of Workload Catalogue Item IDs you want returned, comma delimited.
offset query integer false Pagination - The page number to return.
limit query integer false Pagination - The number of items per page to return.
sort query string false The field to sort on.
sort_order query string false The sort order - up or down.
include_versions query boolean false Do you want all Versions?
include_parameters query boolean false Do you want the Parameter dictionary?
include_tags query boolean false Do you want all the Tags?

Detailed descriptions

filter: List of Workload Catalogue Item statuses you want returned, comma delimited.

Filter options available: STARTED, RUNNING, SUCCEEDED, FAILED, TIMED_OUT, ABORTED.

Enumerated Values

Parameter Value
sort Id
sort Name
sort Description
sort Status
sort OrganisationId
sort Public
sort CreatedTS
sort CreatedBy
sort ModifiedTS
sort UserTaskId
sort CatalogueVersionId
sort Protection
sort_order ASC
sort_order DESC

Example responses

200 Response

{
  "WorkloadCatalogues": [
    {
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Paging": {
        "NextOffset": 20,
        "PrevOffset": null,
        "Total": 100
      },
      "WorkloadCatalogueItems": [
        {
          "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "CreatedTS": "2018-10-11T01:05:45.000Z",
          "Description": "A Workload to build a VPC in my org",
          "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "ModifiedTS": "2018-10-11T01:05:45.000Z",
          "Name": "my-directory-service",
          "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
          "Protection": false,
          "Public": false,
          "Status": "NEW",
          "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
          "Versions": [
            {
              "CatalogueId": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "CreatedTS": "2018-10-11T01:05:45.000Z",
              "Description": "A Workload to build a VPC in my org",
              "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
              "ModifiedTS": "2018-10-11T01:05:45.000Z",
              "Outputs": [
                "bread"
              ],
              "Parameters": [
                {
                  "CostCode": "12345",
                  "Dept": "Marketing"
                }
              ],
              "Public": false,
              "Status": "NEW",
              "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
              "WorkloadVersion": "0.01"
            }
          ]
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. workloads.ReadCatalogueItems
400 Bad Request The response returned if an invalid ID is entered. Error
404 Not Found The response returned if no catalogue is found. Error

Update Workload Catalogue Item

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/workload-catalogue/{catalogue_id}', headers = headers)

print(r.json())

PUT /20190206/workload-catalogue/{catalogue_id}

Creates a new version of a Workload Catalogue Item.
Workload Catalogue Items have one or more versions and are immutable, so any changes are a new version.

Body parameter

{
  "Description": "A Workload to build a VPC in my org",
  "ManifestBody": "Resources:\n    - VPC:\n        Type: AWS::Cloudformation\n        TemplateURL: s3://{JumaArtifactBucket}/workload-vpc/vpc-2-tier-no-NAT.yml\n",
  "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
  "Parameters": {
    "CostCode": "12345",
    "Dept": "Marketing"
  },
  "Tags": {
    "CostCode": "12345"
  },
  "Version": "1.0.2"
}

Parameters

Name In Type Required Description
catalogue_id path string true The UUID of the Catalogue Item to update.
body body workloads.CreateCatalogueVersion true none

Example responses

200 Response

{
  "CatalogueId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "CustomerId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "Detail": {
    "TraceId": "string",
    "WorkloadCatalogueItem": {
      "CatalogueId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Description": "A Workload to build a VPC in my org",
      "ManifestBody": "Resources:\n    - VPC:\n        Type: AWS::Cloudformation\n        TemplateURL: s3://{JumaArtifactBucket}/workload-vpc/vpc-2-tier-no-NAT.yml\n",
      "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
      "Operation": "CREATE",
      "OrganisationId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Public": false,
      "Version": "0.01"
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string"
  },
  "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
  "TraceId": "string",
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. CreateVersionEvent
400 Bad Request The response returned if the catalogue manifest is invalid. Error
403 Forbidden The response returned if the catalogue has already been deleted. Error
404 Not Found The Workload Catalog ID can not be found or does not belong to the user. Error

Delete Workload Catalogue Version

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/workload-catalogue/{catalogue_id}/{version_id}', headers = headers)

print(r.json())

DELETE /20190206/workload-catalogue/{catalogue_id}/{version_id}

Delete a Workload Catalogue Version from your Stax Organisation.
Existing Workloads launched from this Workload Catalogue Version will not be deleted.

Parameters

Name In Type Required Description
catalogue_id path string true The UUID of the Catalogue Item.
version_id path string true The UUID of the Catalogue Version to delete.

Example responses

200 Response

{
  "Detail": {
    "TraceId": "string",
    "WorkloadCatalogueVersion": {
      "CatalogueId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "A Workload to build a VPC in my org",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Outputs": [
        "bread"
      ],
      "Public": false,
      "Status": "NEW",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "WorkloadVersion": "0.01"
    },
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. DeleteVersionEvent
400 Bad Request The Workload Catalogue Version can not be deleted due to running workloads. Error
404 Not Found The Workload Catalogue Version can not be found or does not belong to the user. Error

Fetch Workload Catalogue Version

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workload-catalogue/{catalogue_id}/{version_id}', headers = headers)

print(r.json())

GET /20190206/workload-catalogue/{catalogue_id}/{version_id}

Return a specific Workload Catalogue Version.

Parameters

Name In Type Required Description
catalogue_id path string true The UUID of the Catalogue Item to return.
version_id path string true The UUID of the Catalogue Version to return.
include_parameters query boolean false Do you want the Parameter dictionary?

Example responses

200 Response

{
  "Versions": [
    {
      "CatalogueId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Description": "A Workload to build a VPC in my org",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ManifestURL": "S3://{StaxArtifactBucket}/workload-vpc/your-template-ref.yml",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Outputs": [
        "bread"
      ],
      "Parameters": [
        {
          "CostCode": "12345",
          "Dept": "Marketing"
        }
      ],
      "Public": false,
      "Status": "NEW",
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "WorkloadVersion": "0.01"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. workloads.ReadCatalogueVersion
400 Bad Request The response returned if an invalid ID is entered. Error
404 Not Found The Workload Catalog ID or Catalogue Version ID can not be found or does not belong to the user. Error

Update All Workloads

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/workload-update', headers = headers)

print(r.json())

POST /20190206/workload-update

(DEPRECATED) Update all active Workloads for a specific Workload Catalogue Item.

Body parameter

{
  "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CatalogueVersionId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
}

Parameters

Name In Type Required Description
body body workloads.UpdateAll true none

Example responses

200 Response

{
  "Detail": {
    "TaskId": "e893d7e0-9306-11e9-bc42-526af7764f64",
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string"
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. StaxEvent
400 Bad Request The response returned if the Catalogue is not owned by the User. Error
403 Forbidden The response returned if the request is unsuccessful. Error

Fetch Workloads

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workloads', headers = headers)

print(r.json())

GET /20190206/workloads

Return a list of all Workloads available within your Stax Organisation.
Optionally, return the requested Workload.

Parameters

Name In Type Required Description
name query string false The Name of the Workloads to return.
filter query string false Comma delimited list of Stax Workload statuses. Returns all Workloads with this status.
account_names query string false Comma delimited list of Stax Account Names. Returns all Workloads deployed to these Accounts Names.
account_types query string false Comma delimited list of Stax Account Types. Returns all Workloads deployed to these Account Types.
account_ids query string false Comma delimited list of Stax Account IDs. Returns all Workloads deployed to these Account IDs.
id_filter query string false Comma delimited list of Stax Workload IDs. Returns all Workloads with these Workload IDs.
catalogue_names query string false Comma delimited list of Stax Workload Catalogue Names. Returns all Workloads deployed with these Workload Catalogue Names.
catalogue_ids query string false Comma delimited list of Stax Workload Catalogue IDs. Returns all Workloads deployed with these Catalogue IDs.
catalogue_version query string false Only return Workloads launched from this Stax Workload Catalogue Version (eg. 1.0.0). Requires catalogue_ids
catalogue_version_id query string false Only return Workloads launched from this Stax Workload Catalogue Version ID.
offset query integer false Pagination - The page number to return. Must be used with limit
limit query integer false Pagination - The number of items per page to return. Must be used with offset
sort query string false The field to sort on.
sort_order query string false The sort order - up or down.

Detailed descriptions

filter: Comma delimited list of Stax Workload statuses. Returns all Workloads with this status. Filter Options available: NEW, INITIALIZING, ACTIVE, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE.

Enumerated Values

Parameter Value
sort Id
sort Name
sort AccountId
sort CatalogueId
sort CatalogueVersionId
sort Region
sort Status
sort UserTaskId
sort CreatedBy
sort CreatedTS
sort ModifiedTS
sort FactoryVersion
sort_order ASC
sort_order DESC

Example responses

200 Response

{
  "Paging": {
    "NextOffset": 20,
    "PrevOffset": null,
    "Total": 100
  },
  "Workloads": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "my-workload-is-cool",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Region": "us-east-1",
      "Status": "NEW",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A list of all Workloads for the logged in Customer. workloads.ReadWorkloadsResponse
400 Bad Request The response returned if the Workload ID is not a valid UUID. Error
404 Not Found The Workload ID can not be found or does not belong to the user. Error

Deploy Workload

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.au1.staxapp.cloud/20190206/workloads', headers = headers)

print(r.json())

POST /20190206/workloads

Deploy a Workload within an AWS Account.

Body parameter

{
  "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CatalogueVersionId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "Name": "my-workload-is-cool",
  "Parameters": [
    {
      "Key": "CostCode",
      "Value": "12345"
    }
  ],
  "Region": "ap-northeast-1",
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
body body workloads.CreateWorkload true none

Example responses

200 Response

{
  "DetailType": "string",
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "Workload": {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Name": "my-workload-is-cool",
      "Operation": "CREATE",
      "OrgId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Region": "us-east-1",
      "Tags": {
        "CostCode": "12345"
      },
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string",
      "WorkloadId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  },
  "WorkloadId": "e893d7e0-9306-11e9-bc42-526af7764f64"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. CreateWorkloadEvent
400 Bad Request The response returned if the request is unsuccessful. StaxEvent

Terminate Workload

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.au1.staxapp.cloud/20190206/workloads/{workload_id}', headers = headers)

print(r.json())

DELETE /20190206/workloads/{workload_id}

Terminate an active Workload within an AWS Account.

Parameters

Name In Type Required Description
workload_id path string true The UUID of the Workload to delete.

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "TraceId": "string",
    "Workload": {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Name": "my-workload-is-cool",
      "Operation": "CREATE",
      "OrgId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Region": "us-east-1",
      "Tags": {
        "CostCode": "12345"
      },
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string",
      "WorkloadId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc"
    }
  },
  "DetailType": "string"
}

Responses

Status Meaning Description Schema
200 OK The response returned if the request is successful. DeleteWorkloadEvent
400 Bad Request The response returned if the request is unsuccessful. StaxEvent
403 Forbidden The Workload is Protected. Protection must be disabled before you can delete it. StaxEvent
404 Not Found The Workload ID can not be found or does not belong to the user. Error

Fetch Workload

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.au1.staxapp.cloud/20190206/workloads/{workload_id}', headers = headers)

print(r.json())

GET /20190206/workloads/{workload_id}

Return a list of all Workloads available within your Stax Organisation.
Optionally, return the requested Workload.

Parameters

Name In Type Required Description
workload_id path string true The UUID of the Workload Item to return.
name query string false The Name of the Workloads to return.
filter query string false Comma delimited list of Stax Workload statuses. Returns all Workloads with this status.
account_names query string false Comma delimited list of Stax Account Names. Returns all Workloads deployed to these Accounts Names.
account_types query string false Comma delimited list of Stax Account Types. Returns all Workloads deployed to these Account Types.
account_ids query string false Comma delimited list of Stax Account IDs. Returns all Workloads deployed to these Account IDs.
id_filter query string false Comma delimited list of Stax Workload IDs. Returns all Workloads with these Workload IDs.
catalogue_names query string false Comma delimited list of Stax Workload Catalogue Names. Returns all Workloads deployed with these Workload Catalogue Names.
catalogue_ids query string false Comma delimited list of Stax Workload Catalogue IDs. Returns all Workloads deployed with these Catalogue IDs.
catalogue_version query string false Only return Workloads launched from this Stax Workload Catalogue Version (eg. 1.0.0). Requires catalogue_ids
catalogue_version_id query string false Only return Workloads launched from this Stax Workload Catalogue Version ID.
offset query integer false Pagination - The page number to return. Must be used with limit
limit query integer false Pagination - The number of items per page to return. Must be used with offset
sort query string false The field to sort on.
sort_order query string false The sort order - up or down.
include_tags query boolean false Do you want all the Tags?

Detailed descriptions

filter: Comma delimited list of Stax Workload statuses. Returns all Workloads with this status.

Filter Options available: NEW, INITIALIZING, ACTIVE, CREATE_FAILED, DELETE_IN_PROGRESS, DELETED, DELETE_FAILED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE.

Enumerated Values

Parameter Value
sort Id
sort Name
sort AccountId
sort CatalogueId
sort CatalogueVersionId
sort Region
sort Status
sort UserTaskId
sort CreatedBy
sort CreatedTS
sort ModifiedTS
sort FactoryVersion
sort_order ASC
sort_order DESC

Example responses

200 Response

{
  "Paging": {
    "NextOffset": 20,
    "PrevOffset": null,
    "Total": 100
  },
  "Workloads": [
    {
      "AccountId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedTS": "2018-10-11T01:05:45.000Z",
      "Id": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "ModifiedTS": "2018-10-11T01:05:45.000Z",
      "Name": "my-workload-is-cool",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Region": "us-east-1",
      "Status": "NEW",
      "Tags": {
        "CostCode": "12345"
      },
      "UserTaskId": "e893d7e0-9306-11e9-bc42-526af7764f64"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A list of all Workloads for the logged in Customer. workloads.ReadWorkloadsResponse
400 Bad Request The response returned if the Workload ID is not a valid UUID. Error
404 Not Found The Workload ID can not be found or does not belong to the user. Error

Update Workload

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://api.au1.staxapp.cloud/20190206/workloads/{workload_id}', headers = headers)

print(r.json())

PUT /20190206/workloads/{workload_id}

Update a Workload running within an AWS Account.

Body parameter

{
  "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "CatalogueVersionId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
  "Parameters": [
    {
      "Key": "CostCode",
      "Value": "12345"
    }
  ],
  "Protection": true,
  "Tags": {
    "CostCode": "12345"
  }
}

Parameters

Name In Type Required Description
workload_id path string true The UUID of the Workload to update.
body body workloads.UpdateWorkload true none

Example responses

200 Response

{
  "Detail": {
    "Message": {
      "CustomerId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TaskId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "TraceId": "string"
    },
    "Operation": "CREATE",
    "OperationStatus": "STARTED",
    "Severity": "string",
    "Workload": {
      "AccountId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CatalogueId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "CatalogueVersionId": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "CreatedBy": "e893d7e0-9306-11e9-bc42-526af7764f64",
      "Name": "my-workload-is-cool",
      "Operation": "CREATE",
      "OrgId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "OrganisationId": "ec5eaa8f-da06-4935-b5ce-05bd957c8bdc",
      "Parameters": {
        "CostCode": "12345",
        "Dept": "Marketing"
      },
      "Protection": false,
      "Region": "us-east-1",
      "T