1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-10 21:30:06 +02:00
copilot/cloudapi-graphql/README.md
Sérgio Ramos 04e604eb8e use port 4000 by default
also:
 - use prettier
 - uddate dependencies
 - document other ways of setting up credentials
2017-04-27 19:26:15 +01:00

3.9 KiB

Docker Repository on Quay

cloudapi-graphql

Proof-of-Concept of the Joyent Cloud API running on GraphQL.

Setup

Setup Credentials

Create credentials.json:

{
  "url": "https://us-sw-1.api.joyentcloud.com",
  "keyId": "", //public key fingerprint ex: 35:jh:42:56...
  "account": "", // account ex: raoulmillais
  "user": "" // sub-account ex: ramitos
}

Alternatively you can just use ENV variables:

SDC_URL
SDC_ACCOUNT
SDC_USER
SDC_KEY_ID

As a third option you can use a .env file.

Install Dependencies and run

yarn install
yarn start

Visit GraphiQL

Go-to http://0.0.0.0:4000/graphql to use the REPL with interactive documentation.

GraphiQL

API

  • Account
    • GetAccount
    • UpdateAccount
  • Keys
    • ListKeys
    • GetKey
    • CreateKey
    • DeleteKey
  • Users
    • ListUsers
    • GetUser
    • CreateUser
    • UpdateUser
    • ChangeUserPassword
    • DeleteUser
  • Roles
    • ListRoles
    • GetRole
    • CreateRole
    • UpdateRole
    • DeleteRole
  • Role Tags
    • SetRoleTags
  • Policies
    • ListPolicies
    • GetPolicy
    • CreatePolicy
    • UpdatePolicy
    • DeletePolicy
  • User SSH Keys
    • ListUserKeys
    • GetUserKey
    • CreateUserKey
    • DeleteUserKey
  • Config
    • GetConfig
    • UpdateConfig
  • Datacenters
    • ListDatacenters
    • GetDatacenter
  • Services
    • ListServices
  • Images
    • ListImages
    • GetImage
    • DeleteImage
    • ExportImage
    • CreateImageFromMachine
    • UpdateImage
  • Packages
    • ListPackages
    • GetPackage
  • Instances
    • ListMachines
    • GetMachine
    • CreateMachine
    • StopMachine
    • StartMachine
    • RebootMachine
    • ResizeMachine
    • RenameMachine
    • EnableMachineFirewall
    • DisableMachineFirewall
    • CreateMachineSnapshot
    • StartMachineFromSnapshot
    • ListMachineSnapshots
    • GetMachineSnapshot
    • DeleteMachineSnapshot
    • UpdateMachineMetadata
    • ListMachineMetadata
    • GetMachineMetadata
    • DeleteMachineMetadata
    • DeleteAllMachineMetadata
    • AddMachineTags
    • ReplaceMachineTags
    • ListMachineTags
    • GetMachineTag
    • DeleteMachineTag
    • DeleteMachineTags
    • DeleteMachine
    • MachineAudit
  • Analytics
    • DescribeAnalytics
    • ListInstrumentations
    • GetInstrumentation
    • GetInstrumentationValue
    • GetInstrumentationHeatmap
    • GetInstrumentationHeatmapDetails
    • CreateInstrumentation
    • DeleteInstrumentation
  • FirewallRules
    • Firewall Rule Syntax
    • ListFirewallRules
    • GetFirewallRule
    • CreateFirewallRule
    • UpdateFirewallRule
    • EnableFirewallRule
    • DisableFirewallRule
    • DeleteFirewallRule
    • ListMachineFirewallRules
    • ListFirewallRuleMachines
  • Fabrics
    • ListFabricVLANs
    • CreateFabricVLAN
    • GetFabricVLAN
    • UpdateFabricVLAN
    • DeleteFabricVLAN
    • ListFabricNetworks
    • CreateFabricNetwork
    • GetFabricNetwork
    • DeleteFabricNetwork
  • Networks
    • ListNetworks
    • GetNetwork
  • Nics
    • ListNics
    • GetNic
    • AddNic
    • RemoveNic