Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Akiban service description for Guzzle.
{
"apiVersion": "v1",
"serviceFullName" : "Akiban Server",
"signatureVersion" : "v1",
"operations": {
"Version": {
"httpMethod": "GET",
"uri": "/v1/version",
"summary": "Get server version.",
"responseClass": "DataOutput"
},
"CreateEntity": {
"httpMethod": "POST",
"uri": "/v1/entity/{name}",
"summary": "Creates a new entity.",
"responseClass": "DataOutput",
"parameters": {
"name": {
"location": "uri",
"description": "Name of entity to create an instance of.",
"required": true
},
"data": {
"location": "body",
"description": "The JSON document with data for this entity.",
"required": true
}
}
},
"GetEntity": {
"httpMethod": "GET",
"uri": "/v1/entity/{name}/{id}",
"summary": "Retrieves a single entity.",
"responseClass": "DataOutput",
"parameters": {
"name": {
"location": "uri",
"description": "Name of entity to retrieve.",
"required": true
},
"id": {
"location": "uri",
"description": "ID of named entity to retrieve.",
"required": true
}
}
},
"GetEntities" : {
"httpMethod": "GET",
"uri": "/v1/entity/{name}",
"summary": "Retrieves a list of entities.",
"responseClass": "DataOutput",
"parameters": {
"name": {
"location": "uri",
"description": "Name of entities to retrieve.",
"required": true
}
}
},
"DeleteEntity": {
"httpMethod": "DELETE",
"uri": "/v1/entity/{name}/{id}",
"summary": "Deletes an entity.",
"responseClass": "NoDataOutput",
"parameters": {
"name": {
"location": "uri",
"description": "Name of entity to delete.",
"required": true
},
"id": {
"location": "uri",
"description": "ID of named entity to delete.",
"required": true
}
}
},
"CreateModel": {
"httpMethod": "POST",
"uri": "/v1/model/parse/{name}",
"summary": "Generate an entity.json from a JSON document and optionally instantiate it.",
"responseClass": "DataOutput",
"parameters": {
"name": {
"location": "uri",
"description": "Name of the new entity.",
"required": true
},
"data": {
"location": "body",
"description": "The JSON document with data for this entity.",
"required": true
},
"create": {
"location": "query",
"description": "If true, create the generated entity.",
"required": false
}
}
},
"ExecuteQuery": {
"httpMethod": "GET",
"uri": "/v1/sql/query",
"summary": "Run a single SQL statement.",
"responseClass": "DataOutput",
"parameters": {
"q": {
"location": "query",
"description": "SQL query to run.",
"required": true
}
}
},
"ExecuteQueries": {
"httpMethod": "POST",
"uri": "/v1/sql/execute",
"summary": "Execute Multiple SQL statements within a single transaction.",
"responseClass": "DataOutput",
"parameters": {
"queries": {
"location": "body",
"description": "SQL queries to run.",
"required": true
}
}
}
},
"models": {
"DataOutput": {
"type": "object",
"properties": {
"status": {
"location": "statusCode",
"type": "integer"
},
"data": {
"location": "body",
"type": "string"
}
}
},
"NoDataOutput": {
"type": "object",
"properties": {
"status": {
"location": "statusCode",
"type": "integer"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.