For the complete documentation index, see llms.txt. This page is also available as Markdown.

Helpers

Obtain a signed upload URL

post

Create a signed upload URL for one of the supported file storages. This endpoint is the first step in creating a file.

SVX Utilities generates a random key under which a file will be registered, and creates a record in the database where the key is stored along with the filename and the content type. A client is then expected to use a signed URL present in response field upload_url to upload a file to a cloud file storage. This URL is only valid for a short period of time specified in response field upload_url_expires_in_seconds.

Uploading is done via HTTP method PUT. The response of this endpoint contains a list of headers which much be included in the PUT request.

The following is an example curl command to upload a file:

curl --location --request PUT \
'https://meecodevstorage0.blob.core.windows.net/dev/66c35456-eb64-42fb-a31a-806530786fe2?se=2023-01-23T08%3A49%3A29Z&sig=mzuonk01F8L%2F0q7avsMvvenk2NwLFVXYsyWJeu5Jdgc%3D&sp=rw&sr=b&sv=2018-11-09' \
--header 'x-ms-blob-type: BlockBlob' \
--data-binary '@/home/john/file.jpg'

After the file is uploaded to Azure Blob Storage, the client is supposed to confirm this upload calling PUT /blobs/{key}.

The response to POST /blobs also contains a URL to retrieve the file, but that functionality is only available after the upload has been confirmed, otherwise it will result in 404 NotFound.

All expired and not confirmed records created with this endpoint will be removed after a while.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
storage_namestringRequired

Name of the file storage. This parameter so optional, if no name is specified, the default file storage is used

Body
content_typestringOptional

content type of the file to be uploaded

filenamestringRequired

name of the file to be uploaded

Responses
200

Success

application/json
post/blobs
POST /blobs?storage_name=text HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "content_type": "image/jpeg",
  "filename": "logo.jpg"
}
{
  "blob": {
    "content_type": "text",
    "filename": "text",
    "key": "text",
    "read_url": "https://example.com",
    "storage_backend_name": "text",
    "storage_backend_type": "text",
    "upload_headers": {},
    "upload_url": "https://example.com",
    "upload_url_expires_in_seconds": 1,
    "uploaded": true
  }
}

Redirect to a file in a cloud file storage

get

Redirect to a file in a cloud file storage.

This endpoint is public and it only requires the file key in the URL.

The Content Disposition header in the response is hardcoded to be inline for now, but it can be made a parameter to this endpoint in future if needed. The filename and the content type included in Content Disposition are taken from the database record created in POST /blobs."

Path parameters
idstringRequired

Blob key

Responses
302

Found

application/json
get/blobs/{id}
GET /blobs/{id} HTTP/1.1
Host: api-sandbox.svx.exchange
Accept: */*

Confirm a blob upload

put

Confirm a blob upload.

After a client retrieves an uploads URL via POST /blobs and uploads a file to that URL, a client is expected to inform SVX Utilities that the upload is successful. The file is not accessible unless the upload is confirmed.

This call may only be performed by the same user who retrieved the upload URL.

The response to the endpoint contains one more upload URL. A client can use it to upload a newer version of the file under the same key. No confirmation is required in this case.

See documentation for POST /blobs for more information.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Blob key

Responses
200

Success

application/json
put/blobs/{id}
PUT /blobs/{id} HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "blob": {
    "content_type": "text",
    "filename": "text",
    "key": "text",
    "read_url": "https://example.com",
    "storage_backend_name": "text",
    "storage_backend_type": "text",
    "upload_headers": {},
    "upload_url": "https://example.com",
    "upload_url_expires_in_seconds": 1,
    "uploaded": true
  }
}

View blob info

get

View information about the file.

This call may only be performed by the same user who retrieved the upload URL and uploaded the file.

Along with a URL to read the file the response to the endpoint contains one more upload URL. A client can use it to upload a newer version of the file under the same key. No confirmation is required in this case.

See documentation for POST /blobs for more information.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Blob key

Responses
200

Success

application/json
get/blobs/{id}/info
GET /blobs/{id}/info HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "blob": {
    "content_type": "text",
    "filename": "text",
    "key": "text",
    "read_url": "https://example.com",
    "storage_backend_name": "text",
    "storage_backend_type": "text",
    "upload_headers": {},
    "upload_url": "https://example.com",
    "upload_url_expires_in_seconds": 1,
    "uploaded": true
  }
}

View blob info

get

View public information about the file.

See documentation for POST /blobs for more information.

Path parameters
idstringRequired

Blob key

Responses
200

Success

application/json
get/blobs/{id}/public_info
GET /blobs/{id}/public_info HTTP/1.1
Host: api-sandbox.svx.exchange
Accept: */*
{
  "blob": {
    "content_type": "text",
    "filename": "text",
    "key": "text",
    "read_url": "https://example.com",
    "storage_backend_name": "text",
    "storage_backend_type": "text",
    "uploaded": true
  }
}

List SVX Wallet deployments for an organisation

get

Returns a paginated list of SVX Wallet deployments for a specific organisation

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
org_idstringRequired

Organisation ID

Query parameters
per_pageintegerOptional

Number of deployments per page

pageintegerOptional

Page number

orderstring · enumOptional

Order direction: asc or desc

Possible values:
Responses
200

Deployments

application/json
get/deployments/wallets/orgs/{org_id}
GET /deployments/wallets/orgs/{org_id} HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Deployments

{
  "deployments": [
    {
      "all_workflows_successful": null,
      "current_user_id": null,
      "git_workflow": null,
      "git_workflow_duration": null,
      "inserted_at": "2023-12-01T10:00:00Z",
      "instance_config_for_workflow_retries": null,
      "instance_id": "xbkm9-vxnve",
      "public_domain": "acme.meeco.app",
      "redis_db": 3,
      "status": "config_values_generated",
      "workflow_reports": null
    }
  ],
  "meta": {
    "order": "desc",
    "order_by": "inserted_at",
    "order_from_params": false,
    "page": 1,
    "page_count": 5,
    "per_page": 20,
    "per_page_from_params": false,
    "records_count": 100
  }
}

Create an SVX Wallet deployment

post

Create an SVX Wallet deployment

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
org_idstringRequired

Organisation ID

Body
descriptionstringOptional

Optional human-readable description for this SVX Wallet instance.

version_seriesstringOptional

Version series to deploy (e.g. "0.1"). Defaults to the configured default_version_series if omitted.

Responses
200

Created

application/json
instance_idstring · uuidRequired

The SVX Wallet instance ID

post/deployments/wallets/orgs/{org_id}
POST /deployments/wallets/orgs/{org_id} HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "description": "text",
  "version_series": "text"
}
{
  "instance_id": "550e8400-e29b-41d4-a716-446655440000"
}

Get an SVX Wallet deployment by instance ID

get

Returns a specific SVX Wallet deployment by instance ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Instance ID

Responses
200

Deployment

application/json
all_workflows_successfulboolean · nullableOptional

Whether all workflows completed successfully

current_user_idstring · uuid · nullableOptional

Current user ID

db_namestring · nullableOptional

PostgreSQL database name for the SVX Wallet instance

descriptionstring · nullableOptional

Optional human-readable description for this SVX Wallet instance

errorstring · nullableOptional

Error message

external_idp_client_idstring · nullableOptional

External IdP client ID

git_workflowstring · nullableOptional

Git workflow status

git_workflow_durationinteger · nullableOptional

Git workflow duration in milliseconds

inserted_atstring · date-timeRequired

Creation timestamp

instance_config_for_workflow_retriesobject · nullableOptional

Config data for workflow retries

instance_idstringRequired

SVX Wallet instance ID

internal_domainstring · nullableOptional

Internal domain for the deployment

online_atstring · date-time · nullableOptional

Timestamp when deployment went online

online_check_counterintegerRequired

Counter for online status checks

Default: 0
online_status_checked_atstring · date-time · nullableOptional

Timestamp when online status was last checked

org_idstring · nullableOptional

Organisation ID

org_namestring · nullableOptional

Organisation name

public_domainstring · nullableOptional

Public domain URL for the deployment

redis_dbintegerRequired

Redis database number

statusstringRequired

Current deployment status

tenant_idstring · nullableOptional

Tenant ID

tenant_namestring · nullableOptional

Tenant name

workflow_reportsobject · nullableOptional

Reports from workflow executions

get/deployments/wallets/{id}
GET /deployments/wallets/{id} HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "all_workflows_successful": null,
  "current_user_id": null,
  "description": "Acme Corp production wallet",
  "error": null,
  "external_idp_client_id": "some-client-id",
  "git_workflow": null,
  "git_workflow_duration": null,
  "git_workflow_log": [
    {
      "status": "4.config_files_added",
      "timestamp": "2023-12-01T10:30:00Z"
    },
    {
      "status": "3.repo_cloned",
      "timestamp": "2023-12-01T10:25:00Z"
    }
  ],
  "inserted_at": "2023-12-01T10:00:00Z",
  "instance_config_for_workflow_retries": null,
  "instance_id": "xbkm9-vxnve",
  "internal_domain": "acme.wallet.internal",
  "online_at": null,
  "online_check_counter": 0,
  "online_status_checked_at": null,
  "public_domain": "acme.meeco.app",
  "redis_db": 3,
  "status": "config_values_generated",
  "versions": {
    "deployed_version": "0.1.0",
    "version_history": null,
    "version_series": "0.1"
  },
  "workflow_reports": null
}

Delete an SVX Wallet deployment by instance ID

delete

Deletes a specific SVX Wallet deployment by instance ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Instance ID

Responses
204

No Content

application/json
delete/deployments/wallets/{id}
DELETE /deployments/wallets/{id} HTTP/1.1
Host: api-sandbox.svx.exchange
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
get

Redirect to the logo of an organisation.

This endpoint is public and it only requires the organisation ID in the URL.

Path parameters
org_idstring · uuidRequired

Organisation ID

Responses
302

Found

application/json
get/orgs/{org_id}/logo
GET /orgs/{org_id}/logo HTTP/1.1
Host: api-sandbox.svx.exchange
Accept: */*
get

Redirect to the logo of a tenant.

This endpoint is public and it only requires the tenant ID in the URL.

Path parameters
tenant_idstring · uuidRequired

Tenant ID

Responses
302

Found

application/json
get/tenants/{tenant_id}/logo
GET /tenants/{tenant_id}/logo HTTP/1.1
Host: api-sandbox.svx.exchange
Accept: */*

Last updated