Offered APIs¶
This document describes the MUSIC (Multi-site State Coordination Service) API
To view API documentation in the interactive swagger UI download the following and paste into the swagger tool here: https://editor.swagger.io
Data Api¶
GET /v2/keyspaces/{keyspace}/tables/{tablename}/rows
Select All or Select Specific
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
POST /v2/keyspaces/{keyspace}/tables/{tablename}/rows
Insert Into Table
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
PUT /v2/keyspaces/{keyspace}/tables/{tablename}/rows
Update Table
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
DELETE /v2/keyspaces/{keyspace}/tables/{tablename}/rows
Delete From table
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
POST /v2/keyspaces/{name}
Create Keyspace
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
Authorization |
header |
Authorization |
string |
ns |
header |
Application namespace |
string |
body |
body |
||
name |
path |
Keyspace Name |
string |
Responses
200 - successful operation
DELETE /v2/keyspaces/{name}
Delete Keyspace
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
Authorization |
header |
Authorization |
string |
ns |
header |
Application namespace |
string |
name |
path |
Keyspace Name |
string |
Responses
200 - successful operation
POST /v2/keyspaces/{keyspace}/tables/{tablename}/index/{field}
Create Index
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
field |
path |
Field Name |
string |
Responses
200 - successful operation
PUT /v2/keyspaces/{keyspace}/tables/{tablename}/rows/criticalget
Select Critical
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
POST /v2/keyspaces/{keyspace}/tables/{tablename}
Create Table
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
DELETE /v2/keyspaces/{keyspace}/tables/{tablename}
Drop Table
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
keyspace |
path |
Keyspace Name |
string |
tablename |
path |
Table Name |
string |
Responses
200 - successful operation
Healthcheck Api¶
GET /v{version}/service/pingZookeeper
Get Health Status
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|
Responses
200 - successful operation
GET /v{version}/service/musicHealthCheck
Get Health Status
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|
Responses
200 - successful operation
GET /v{version}/service/pingCassandra/{consistency}
Get Health Status
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
consistency |
path |
Consistency level |
string |
Responses
200 - successful operation
Lock Api¶
POST /v2/locks/create/{lockname}
Create Lock
Description: Puts the requesting process in the q for this lock. The corresponding lock will be created if it did not already exist. Lock Name is the “key” of the form keyspaceName.tableName.rowId
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
lockname |
path |
Lock Name |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
Authorization |
header |
Authorization |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
GET /v2/locks/acquire/{lockreference}
Aquire Lock
Description: Checks if the node is in the top of the queue and hence acquires the lock
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
lockreference |
path |
Lock Reference |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
Authorization |
header |
Authorization |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
POST /v2/locks/acquire-with-lease/{lockreference}
Aquire Lock with Lease
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
body |
body |
||
lockreference |
path |
Lock Reference |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
Authorization |
header |
Authorization |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
GET /v2/locks/enquire/{lockname}
Get Lock Holder
Description: Gets the current Lock Holder
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
lockname |
path |
Lock Name |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
Authorization |
header |
Authorization |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
GET /v2/locks/{lockname}
Lock State
Description: Returns current Lock State and Holder.
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
lockname |
path |
Lock Name |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
Authorization |
header |
Authorization |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
DELETE /v2/locks/release/{lockreference}
Release Lock
Description: deletes the process from the zk queue
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
lockreference |
path |
string |
|
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
Authorization |
header |
Authorization |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
DELETE /v2/locks/delete/{lockname}
Delete Lock
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
lockname |
path |
string |
|
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
Authorization |
header |
Authorization |
string |
ns |
header |
Application namespace |
string |
Responses
200 - successful operation
Q Api¶
POST /{version}/priorityq/keyspaces/{keyspace}/{qname}
Create Q
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
200 - successful operation
DELETE /{version}/priorityq/keyspaces/{keyspace}/{qname}
DropQ
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
200 - successful operation
POST /{version}/priorityq/keyspaces/{keyspace}/{qname}/rows
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
default - successful operation
PUT /{version}/priorityq/keyspaces/{keyspace}/{qname}/rows
updateQ
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
200 - successful operation
DELETE /{version}/priorityq/keyspaces/{keyspace}/{qname}/rows
deleteQ
Description:
Consumes: [‘application/json’]
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
body |
body |
||
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
200 - successful operation
GET /{version}/priorityq/keyspaces/{keyspace}/{qname}/peek
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
200 - successful operation
GET /{version}/priorityq/keyspaces/{keyspace}/{qname}/filter
filter
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|---|---|---|
version |
path |
Major Version |
string |
X-minorVersion |
header |
Minor Version |
string |
X-patchVersion |
header |
Patch Version |
string |
aid |
header |
AID |
string |
ns |
header |
Application namespace |
string |
Authorization |
header |
Authorization |
string |
keyspace |
path |
Key Space |
string |
qname |
path |
Table Name |
string |
Responses
200 - successful operation
Test Api¶
GET /v{version}/test
Get Test
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|
Responses
200 - successful operation
Version Api¶
GET /v{version}/version
Get Version
Description:
Produces: [‘application/json’]
Parameters
Name |
Position |
Description |
Type |
---|
Responses
200 - successful operation