manifold-api

module
v0.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: MIT

README

GitHub Actions Go Version Go Report Card Go Reference

Manifold API Client Bindings

View the API swagger doc.

Go Bindings

Sample client:

https://github.com/SoftIron/manifold-api/blob/8c3b8df3014d447a21e34fc80ccf8316a90084ef/example/main.go#L3-L64

Manual Use

Login

The API uses Basic Authentication where the client does a GET login and includes a username and password in the Authorization header.

Included in the response is an access token in the form of a JSON Web Token with a 10 minute TTL.

Tokens

Access Token

All subsequest requests must use the access token in the Authorization header, for example:

Authorization: Bearer dht467bv4570flw2r

If a request uses an expired token the request will return HTTP code 401 (unauthorized). This is a hint to the client to re-login and obtain a new access token.

Refresh Token

The following is true for development releases of the API only, and is not a released feature.

In addition to returning an access token, a login will also return a refresh token in the form of a JSON Web Token with a one year TTL. This token can be used in place of Basic Authentication to re-login and obtain a new access and refresh token.

Refresh tokens are single use, so once used the server will reject it (401) even if the TTL has not expired. If the refresh token has expired or was lost a re-login must use Basic Authentication with a username and password.

Usage of refresh tokens is optional, and the client can instead re-login using Basic Authentication.

Directories

Path Synopsis
Package client is a generic REST client for BasicAuth / JWT services.
Package client is a generic REST client for BasicAuth / JWT services.
Package cloud documents the request and response payloads for version 2 of the sifi API.
Package cloud documents the request and response payloads for version 2 of the sifi API.
config
Package config contains struct for the CloudConfiguration payload.
Package config contains struct for the CloudConfiguration payload.
datacenter
Package datacenter provides structs for the Datacenter payload.
Package datacenter provides structs for the Datacenter payload.
instance
Package instance contains structs for the Instance payload.
Package instance contains structs for the Instance payload.
network
Package network provides structs for the VNet payload.
Package network provides structs for the VNet payload.
deprecated
v1/hc
Package hc documents the request and response payloads for version 1 of the sifi API.
Package hc documents the request and response payloads for version 1 of the sifi API.
v1/sifi
Package sifi implements the go language bindings for the Manifold API.
Package sifi implements the go language bindings for the Manifold API.
v2/cloud
Package cloud documents the request and response payloads for version 2 of the sifi API.
Package cloud documents the request and response payloads for version 2 of the sifi API.
v2/cloud/config
Package config contains struct for the Configuration payload.
Package config contains struct for the Configuration payload.
v2/cloud/datacenter
Package datacenter provides structs for the Datacenter payload.
Package datacenter provides structs for the Datacenter payload.
v2/cloud/instance
Package instance contains structs for the Instance payload.
Package instance contains structs for the Instance payload.
v2/cloud/insttmpl
Package insttmpl provides structs for the InstanceTemplate payload.
Package insttmpl provides structs for the InstanceTemplate payload.
v2/cloud/nettmpl
Package nettmpl provides strcuts for the VNetTemplate payload.
Package nettmpl provides strcuts for the VNetTemplate payload.
v2/cloud/network
Package network provides structs for the VNet payload.
Package network provides structs for the VNet payload.
v2/metal
Package metal documents the request and response payloads for the bare metal of the system.
Package metal documents the request and response payloads for the bare metal of the system.
v2/snapshot
Package snapshot documents the request and response payloads related to the snapshot daemon.
Package snapshot documents the request and response payloads related to the snapshot daemon.
Package main is an example manifold-api client that prints out the name of the instance with an ID of 0.
Package main is an example manifold-api client that prints out the name of the instance with an ID of 0.
gen
internal
api
Package api implements common internal types across the Manifold API.
Package api implements common internal types across the Manifold API.
Package manifold implements the Go language bindings for the Manifold API.
Package manifold implements the Go language bindings for the Manifold API.
Package metal documents the request and response payloads for the bare metal layer.
Package metal documents the request and response payloads for the bare metal layer.
python
manifold
Package main writes sifi constants to a python file.
Package main writes sifi constants to a python file.
Package snapshot documents the request and response payloads related to the snapshot daemon.
Package snapshot documents the request and response payloads related to the snapshot daemon.
Package upload provides bindings for the file upload service.
Package upload provides bindings for the file upload service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL