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

swagger.json

Q Api

PUT /{version}/priorityq/keyspaces/{keyspace}/{qname}/rows

updateQ

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

POST /{version}/priorityq/keyspaces/{keyspace}/{qname}/rows

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

DELETE /{version}/priorityq/keyspaces/{keyspace}/{qname}/rows

deleteQ

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

  • Produces: [u’application/json’]
  • Description:

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}

Create Q

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

  • Produces: [u’application/json’]
  • Description:

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

  • Produces: [u’application/json’]
  • Description:

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

Lock Api

DELETE /v2/locks/release/{lockreference}

Release Lock

  • Produces: [u’application/json’]
  • Description: deletes the process from the zk queue

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

  • Produces: [u’application/json’]
  • Description:

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

GET /v2/locks/acquire/{lockreference}

Aquire Lock

  • Produces: [u’application/json’]
  • Description: Checks if the node is in the top of the queue and hence acquires the lock

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

GET /v2/locks/enquire/{lockname}

Get Lock Holder

  • Produces: [u’application/json’]
  • Description: Gets the current Lock Holder

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

  • Produces: [u’application/json’]
  • Description: Returns current Lock State and Holder.

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

POST /v2/locks/create/{lockname}

Create Lock

  • Produces: [u’application/json’]
  • 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

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

POST /v2/locks/acquire-with-lease/{lockreference}

Aquire Lock with Lease

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

Version Api

GET /v{version}/version

Get Version

  • Produces: [u’application/json’]
  • Description:

Parameters

Name Position Description Type

Responses

200 - successful operation

Data Api

PUT /v2/keyspaces/{keyspace}/tables/{tablename}/rows

Update Table

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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}/rows

Insert Into Table

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

GET /v2/keyspaces/{keyspace}/tables/{tablename}/rows

Select All or Select Specific

  • Produces: [u’application/json’]
  • Description:

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}

Create Table

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

  • Produces: [u’application/json’]
  • Description:

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/{name}

Create Keyspace

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

  • Produces: [u’application/json’]
  • Description:

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

  • Produces: [u’application/json’]
  • Description:

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

  • Produces: [u’application/json’]
  • Description:
  • Consumes: [u’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

Test Api

GET /v{version}/test

Get Test

  • Produces: [u’application/json’]
  • Description:

Parameters

Name Position Description Type

Responses

200 - successful operation

Healthcheck Api

GET /v{version}/service/pingZookeeper

Get Health Status

  • Produces: [u’application/json’]
  • Description:

Parameters

Name Position Description Type

Responses

200 - successful operation

GET /v{version}/service/musicHealthCheck

Get Health Status

  • Produces: [u’application/json’]
  • Description:

Parameters

Name Position Description Type

Responses

200 - successful operation

GET /v{version}/service/pingCassandra/{consistency}

Get Health Status

  • Produces: [u’application/json’]
  • Description:

Parameters

Name Position Description Type
consistency path Consistency level string

Responses

200 - successful operation