-=[ qSOA ® API REST Fast Specification ]=-
qSOA® ConnectionPoint's Security API [/api/login]

echoping Returns a test response (simple string message) to validate the security service is enabled.

echouser Returns if a user is connected and authenticated or there is no security session active, with extended string information

echostatus Returns if a user is authenticated or there is no security session active, boolean result.

authenticate Initialize the authenticate process, and returns a JWT bearer token, that must be used as API Authorization Header in the qSOA® API calls.
POST: the action requires the JSon Authentication class:
{ "Username":"aUsernameCredential", "Password":"password" }

authenticateEx Initialize the authenticate process, and returns a JWT bearer token, that must be used as API Authorization Header in the qSOA® API calls.
POST: the action requires the JSon Authentication class: { "Username":"aUsernameCredential", "Password":"Hash256(password)" }
This API method is a Security enhancement of the authenticate use case. Password must be enter applying a Hash256 crypto function.

Try the API online through our swagger UI implementation... You can try online the qSOA API through our swagger UI implementation. Thanks to the swagger UI utilities you will access visually to every connection point
and understand, experiment and test each of them. Very useful if you want to test directly the API before implement your client side.
The Security ConnectionPoints has the responsability of authenticate, validate and return the JWT Token to authorize the Lifecycle ConnectionPoints. So remember to
FIRST: Execute one of the three methods to authenticate your user
SECOND: Get the returned Token and use it in the AUTHORIZE Button, filling the value field using the format Bearer TOKEN
click here to open qSOA swagger ui

qSOA® ConnectionPoint's API [api/connectionPoint]

GetVersion Returns version of ConnectionPoint service.

GetQuantumSolutions Returns the list of quantum solutions, in a standard dictionary collection.
{
"SolutionID": "Solution Name"
[,...]
}

GetQuantumSolutionsEx Returns the list of quantum solutions -with extended information-. This connection point returns a list of Solution Object type.
The Solution object has the format:
[
{
"SolutionID": "Solution ID",
"SolutionName": "Solution name",
"QuantumType": {
 IdQuantumType: integer,
 Name: "quantum type description"
 }
},
{...}
]

QuantumType is a master registry in the system. Values can be:
 1 - QUANTUM GATES
 2 - QUANTUM ANNEALING

GetQuantumDevices/{idSolution} Return the Quantum devices supported in a specific solution, in a standard dictionary object.
{
"DeviceID": "Device Name"
[,...]
}

GetQuantumDevicesEx/{idSolution} Return the Quantum devices -with extendend information- supported in a specific solution. This connection point returns a list of QuantumDeviceEx Object type. USeful if you want to know more details about the Quantum Devices attached to a a specific solution.
The QuantumDeviceEx object has the format:
[
{
"IdDevice": "Quantumpath device Id",
"DeviceShortName": "Quantum device short name",
"DeviceDescription": "Quantum device description",
"QuantumMachineType": "QUANTUM GATES|QUANTUM ANNEALING",
"DeviceProvider": "Commercial Vendor name",
"DeviceVendor": "Short Vendor name",
"IsLocalSimulator": "true|false"
},
{...}
]

GetQuantumFlows/{idSolution} Return the Quantum flows of a specific solution in a standard dictionary object.
{
"FlowID": "Flow Name"
[,...]
}

RunQuantumApplication/{aIterationName}/{idSolution}/{idFlow}/{idVendor} Launch a execution command to quantum bpm. Returns a string with the GUID key -or "ExecutionToken"- that identify the execution tasks. Use with GetQuantumExecutionResponse.

GetQuantumExecutionResponse/{executionToken}/{idSolution}/{idFlow} Returns the result of a execution command. RETURNS an QuantumExecutionResult object with relevant information about the quantums execution lifecycle.
{
"ExitCode": "Exit code value",
"ExitMessage": "exit message",
"AssetData":
{
"Solution": "Solution name",
"Flow": "Executed Flow",
"Device": "Device name",
"Histogram": "json histogram unified result",
"Duration": duration MILISECS,
}
}
NOTES: the update of an Asset implies lifecycle automatic correlated actions like: compilations and transpilations.
NOTE: ExitCode represent a literal with set of values supported: OK | ERR | WAIT
IMPORTANT: this API function returns QER object through 200 HTTP OK always. Exceptions are controlled through QER response.

qSOA® ConnectionPoint's API Dynamic Extensions [api/connectionPoint]

GetAssetCatalog/{aSolutionID}/{aAssetType}/{aAssetLevel}
Where aSolutionID is the ID of a Solution where to extract assets, aAssetType set the type of Asset required [CIRCUIT or FLOW], and aAssetLevel set the level of language specificacion [VL or IL] -where VL represent Visual Language and IL represent Intermediate Language-
The json response has correspond to a Json List of type AssetMetadata:
[
{
"AssetID": AssetID,
"AssetName": "asset name",
"AssetNamespace": "asset namespace",
"AssetDescription": "asset description.",
"AssetBody": "[BASE64Encoded]asset body in the assetLevel specified format",
"AssetType": "asset type specified",
"AssetLevel": "asset level specified",
"AssetLastUpdate": "last update datetime"
},{...}
]

GetAsset/{aAssetID}/{aAssetType}/{aAssetLevel}
Where aAssetID is the ID of a specific Asset, aAssetType set the type of Asset required [CIRCUIT or FLOW], and aAssetLevel set the level of language specificacion [VL or IL] -where VL represent Visual Language and IL represent Intermediate Language-
The json response has the structure AssetMetadata:
{
"AssetID": AssetID,
"AssetName": "asset name",
"AssetNamespace": "asset namespace",
"AssetDescription": "asset description.",
"AssetBody": "[BASE64Encoded]asset body in the assetLevel specified format",
"AssetType": "asset type specified",
"AssetLevel": "asset level specified",
"AssetLastUpdate": "last update datetime"
}

CreateAsset?aSolutionID={aSolutionID} BETA: LifeCycle 100% Supported but this functionality is now being testing.
Add new Quantum objects to the Quantum catalog's Assets of the given Solution POST: aAssetObject with the properties of the asset you want to create, that has the JSON structure AssetMetadata:
{
"AssetID": -1,
"AssetName": "asset name",
"AssetNamespace": "asset namespace",
"AssetDescription": "asset description.",
"AssetBody": "[BASE64Encoded]asset body in the assetLevel specified format",
"AssetType": "asset type specified",
"AssetLevel": "asset level specified",
"AssetLastUpdate": ""
}

RETURNS AssetManagementData descriptor with relevant information of the object and it's pending lifecycle's BPM's actions
REQUIREMENTS: TYPE supported: GATES | ANNEAL | FLOW. LEVEL supported: VL | IL. Datetime must be empty or dddd-mm-yy hh:mm:ss format, but will be ignored.
NOTES: the creation of an Asset implies lifecycle automatic correlated actions like: compilations and transpilations.

UpdateAsset BETA: LifeCycle 100% Supported but this functionality is now being testing
Updates the Quantum catalog's Assets POST: aAssetObject with the properties of the asset you want to Update, that has the JSON structure AssetMetadata:
{
"AssetID": AssetID,
"AssetName": "asset name",
"AssetNamespace": "asset namespace",
"AssetDescription": "asset description.",
"AssetBody": "[BASE64Encoded]asset body in the assetLevel specified format",
"AssetType": "asset type specified",
"AssetLevel": "asset level specified",
"AssetLastUpdate": ""
}

RETURNS AssetManagementData descriptor with relevant information of the object and it's pending lifecycle's BPM's actions
REQUIREMENTS: TYPE supported: GATES | ANNEAL | FLOW. LEVEL supported: VL | IL. Datetime must be empty or dddd-mm-yy hh:mm:ss format, but will be ignored.
NOTES: the update of an Asset implies lifecycle automatic correlated actions like: compilations and transpilations.

GetAssetManagementResult/{aLifecycleToken} RETURNS an AssetManagementResult object with relevant information about the asset and it's lifecycle.
{
"ExitCode": Exit code value,
"ExitMessage": "exit message",
"AssetData":
{
"LifecycleToken": "LifecycleToken guid",
"SolutionID": solution ID,
"AssetID": AssetID,
"AssetName": "asset name",
"AssetNamespace": "asset namespace",
"AssetType": "asset type specified",
"AssetLevel": "asset level specified",
"IsCompiled": compilation's flag status',
"IsTranspiled": Transpilation's flag status
}
}
NOTES: the update of an Asset implies lifecycle automatic correlated actions like: compilations and transpilations.
NOTE: ExitCode represent a literal with set of values supported: READY | OK | ERR | RUNNING

PublishFlow/{aAssetID}/{aIsPublished} Changes the Publish Flag of the specified Flow Asset. This flag controls if the asset must be available to the GetQuantumFlows API method.

DeleteAsset/{aAssetID}/{aAssetType} Deletes the specified Asset of specified type. IMPORTANT: deletion of the asset, will erase all related information: metadata, compilations, transpilations and telemetry.
REQUIREMENTS: TYPE supported: CIRCUIT | FLOW

GetQuantumExecutionHistoric/{idSolution?}/{idFlow?}/{idDevice?}/{dateTicksFrom?}/{IsSimulator?}/{top?}/{resultType?} Using the filters, this connection point returns historical executions information.
If a filter is null, the system will return all of the possible results associated with this filter.
idSolution, idFlow and idDevice are integer values with the id of the assets and quantum devices executed into, to query for.
dateTicksFrom is a datetime value encoded using the format in TICKS. If this value is null, the query will return the most recent results. if this value is setted, te results will be selected starting using selected date+hour encoded using Ticks.
IsSimulator is a boolean value, that query the kind of QPU used (True for simulators, False for real QPU)
top is an integer value that makes possible get first "top" results. Limited to a maximum of 1000 results.
resultType is a boolean value that set the kind of result based on the result type: True for OK results, False for ERR results.
RETURNS an QuantumExecutionHistoryEntry collection object with relevant information about quantum execution, simplifying quantum computing democratizacion features.
[
{
"IdResult": unique result id,
"IdSolution": solution ID,
"SolutionName": "Solution name",
"IdFlow": flow ID,
"FlowName": "Flow name",
"IdDevice": device ID,
"DeviceName": "Quantum Device Name",
"DeviceShortName": "Quantum Device short name",
"DeviceVendor": "Quantum Vendor",
"IsLocalSimulator": true|false,
"DeviceTypeName": "QUANTUM ANNEALING"|"QUANTUM GATES",
"ResultHistogram": "json histogram unified model (view QuantumPath Histogram results documentation)",
"ExecutionDate": "execution date time",
"DurationMinutes": duration in minutes with decimal's fractions,
"ResultType": "OK"|"ERR",
"ResultDescription": "description result"
},{...}
]
NOTES: All of the arguments of the REST API CALL are nullables, so it's flexible when returning wide/specific results playing with them. By default, filter values are null except "top" that sets 10 results by default
NOTE: the maximum period of time to query historical information, is about 6 months. For more wide range, yo can contact with our technical stuff. NOTE: ExitCode represent a literal with set of values supported: READY | OK | ERR | RUNNING

GetQuantumExecutionHistoricResult/{idResult} RETURNS an QuantumExecutionHistoryEntry collection object with one specific Result Quantum Execution historic Entry. Simplify quantum computing democratization features.
[
{
"IdResult": unique result id,
"IdSolution": solution ID,
"SolutionName": "Solution name",
"IdFlow": flow ID,
"FlowName": "Flow name",
"IdDevice": device ID,
"DeviceName": "Quantum Device Name",
"DeviceShortName": "Quantum Device short name",
"DeviceVendor": "Quantum Vendor",
"IsLocalSimulator": true|false,
"DeviceTypeName": "QUANTUM ANNEALING"|"QUANTUM GATES",
"ResultHistogram": "json histogram unified model (view QuantumPath Histogram results documentation)",
"ExecutionDate": "execution date time",
"DurationMinutes": duration in minutes with decimal's fractions,
"ResultType": "OK"|"ERR",
"ResultDescription": "description result"
},{...}
]
NOTES: This connection point feature returns a collection with only one entry. The return format is the same as historic dictionary to make easier the development of query postprocess.
NOTE: ExitCode represent a literal with set of values supported: READY | OK | ERR | RUNNING

Try the API online through our swagger UI implementation... You can try online the qSOA API through our swagger UI implementation. Thanks to the swagger UI utilities you will access visually to every connection point
and understand, experiment and test each of them. Very useful if you want to test directly the API before implement your client side.
The Lifecycle ConnectionPoints need the JWT Token to authorize the use case executions. So remember to
FIRST: Execute one of the three methods to authenticate your user, using the Security Login Connectionpoints
SECOND: Get the returned Token and use it in the AUTHORIZE Button, filling the value field using the format Bearer TOKEN
click here to open qSOA swagger ui

qSOA® ConnectionPoint's API Developer's conventions

For convenient execution control all the API REST points exposes this specification:
[-] All the Asset's bodies will be encoded using Base64 to protect protocol for grammar special characters
[-] All the succesfull results, will be return as part of HTTP(200) EXIT CODE plus JSON formatted result.
[-] In case of exceptions raised, the api will return the exception message as part of HTTP(400) EXIT CODE plus JSON formatted result:
{
"message": "exception message"
}