1- openapi : 3.0 .0
1+ openapi : 3.1 .0
22info :
33 title : Quantum as a Service API
44 description : |-
@@ -285,6 +285,9 @@ tags:
285285 - name : Bookings
286286 description : |
287287 A booking is a reserved timeframe for a platform where only one user could send its jobs
288+ - name : Models
289+ description : |
290+ A model is a quantum computation (circuit, sequence, hamiltonian...) to be executed by job
288291components :
289292 schemas :
290293 google.protobuf.Int32Value :
@@ -446,6 +449,14 @@ components:
446449 type : string
447450 description : Result of the job, if the job is finished.
448451 nullable : true
452+ model_id :
453+ type : string
454+ description : Computation model ID executed by the job.
455+ nullable : true
456+ parameters :
457+ type : string
458+ description : Execution parameters for this job.
459+ nullable : true
449460 x-properties-order :
450461 - id
451462 - name
@@ -458,6 +469,8 @@ components:
458469 - progress_message
459470 - job_duration
460471 - result_distribution
472+ - model_id
473+ - parameters
461474 scaleway.qaas.v1alpha1.JobCircuit :
462475 type : object
463476 properties :
@@ -559,6 +572,21 @@ components:
559572 x-properties-order :
560573 - total_count
561574 - jobs
575+ scaleway.qaas.v1alpha1.ListModelsResponse :
576+ type : object
577+ properties :
578+ total_count :
579+ type : integer
580+ description : Total number of models.
581+ format : uint64
582+ models :
583+ type : array
584+ description : List of models.
585+ items :
586+ $ref : ' #/components/schemas/scaleway.qaas.v1alpha1.Model'
587+ x-properties-order :
588+ - total_count
589+ - models
562590 scaleway.qaas.v1alpha1.ListPlatformsResponse :
563591 type : object
564592 properties :
@@ -638,6 +666,30 @@ components:
638666 x-properties-order :
639667 - total_count
640668 - sessions
669+ scaleway.qaas.v1alpha1.Model :
670+ type : object
671+ properties :
672+ id :
673+ type : string
674+ description : Unique ID of the model.
675+ created_at :
676+ type : string
677+ description : Time at which the model was created. (RFC 3339 format)
678+ format : date-time
679+ example : " 2022-03-22T12:34:56.123456Z"
680+ nullable : true
681+ url :
682+ type : string
683+ description : Storage URL of the model.
684+ nullable : true
685+ project_id :
686+ type : string
687+ description : Project ID in which the model has been created.
688+ x-properties-order :
689+ - id
690+ - created_at
691+ - url
692+ - project_id
641693 scaleway.qaas.v1alpha1.Platform :
642694 type : object
643695 properties :
@@ -1058,6 +1110,11 @@ components:
10581110 type : string
10591111 description : An optional booking unique ID of an attached booking.
10601112 nullable : true
1113+ model_id :
1114+ type : string
1115+ description : Default computation model ID to be executed by job assigned
1116+ to this session.
1117+ nullable : true
10611118 x-properties-order :
10621119 - id
10631120 - name
@@ -1078,6 +1135,7 @@ components:
10781135 - origin_id
10791136 - progress_message
10801137 - booking_id
1138+ - model_id
10811139 scaleway.qaas.v1alpha1.Session.Access :
10821140 type : string
10831141 enum :
@@ -1475,6 +1533,14 @@ paths:
14751533 description : Maximum duration of the job. (in seconds)
14761534 example : 2.5s
14771535 nullable : true
1536+ model_id :
1537+ type : string
1538+ description : Computation model ID to be executed by the job.
1539+ nullable : true
1540+ parameters :
1541+ type : string
1542+ description : Execution parameters for this job.
1543+ nullable : true
14781544 required :
14791545 - name
14801546 - session_id
@@ -1485,6 +1551,8 @@ paths:
14851551 - session_id
14861552 - circuit
14871553 - max_duration
1554+ - model_id
1555+ - parameters
14881556 security :
14891557 - scaleway : []
14901558 x-codeSamples :
@@ -1765,6 +1833,146 @@ paths:
17651833 source : |-
17661834 http GET "https://api.scaleway.com/qaas/v1alpha1/jobs/{job_id}/results" \
17671835 X-Auth-Token:$SCW_SECRET_KEY
1836+ /qaas/v1alpha1/models :
1837+ get :
1838+ tags :
1839+ - Models
1840+ operationId : ListModels
1841+ summary : List all models attached to the **project ID**
1842+ description : Retrieve information about all models of the provided **project
1843+ ID**.
1844+ parameters :
1845+ - in : query
1846+ name : project_id
1847+ description : List models belonging to this project ID.
1848+ required : true
1849+ schema :
1850+ type : string
1851+ description : List models belonging to this project ID.
1852+ - in : query
1853+ name : page
1854+ description : Page number.
1855+ schema :
1856+ type : integer
1857+ description : Page number.
1858+ format : int32
1859+ - in : query
1860+ name : page_size
1861+ description : Maximum number of results to return per page.
1862+ schema :
1863+ type : integer
1864+ description : Maximum number of results to return per page.
1865+ format : uint32
1866+ - in : query
1867+ name : order_by
1868+ description : Sort order of the returned results.
1869+ schema :
1870+ type : string
1871+ description : Sort order of the returned results.
1872+ enum :
1873+ - created_at_desc
1874+ - created_at_asc
1875+ default : created_at_desc
1876+ responses :
1877+ " 200 " :
1878+ description : " "
1879+ content :
1880+ application/json :
1881+ schema :
1882+ $ref : ' #/components/schemas/scaleway.qaas.v1alpha1.ListModelsResponse'
1883+ security :
1884+ - scaleway : []
1885+ x-codeSamples :
1886+ - lang : cURL
1887+ source : |-
1888+ curl -X GET \
1889+ -H "X-Auth-Token: $SCW_SECRET_KEY" \
1890+ "https://api.scaleway.com/qaas/v1alpha1/models?project_id=string"
1891+ - lang : HTTPie
1892+ source : |-
1893+ http GET "https://api.scaleway.com/qaas/v1alpha1/models" \
1894+ X-Auth-Token:$SCW_SECRET_KEY \
1895+ project_id==string
1896+ post :
1897+ tags :
1898+ - Models
1899+ operationId : CreateModel
1900+ summary : Create a new model
1901+ description : Create and register a new model that can be executed through next
1902+ jobs. A model can also be assigned to a Session.
1903+ responses :
1904+ " 200 " :
1905+ description : " "
1906+ content :
1907+ application/json :
1908+ schema :
1909+ $ref : ' #/components/schemas/scaleway.qaas.v1alpha1.Model'
1910+ requestBody :
1911+ required : true
1912+ content :
1913+ application/json :
1914+ schema :
1915+ type : object
1916+ properties :
1917+ project_id :
1918+ type : string
1919+ description : Project ID to attach this model.
1920+ payload :
1921+ type : string
1922+ description : The serialized model data.
1923+ nullable : true
1924+ x-properties-order :
1925+ - project_id
1926+ - payload
1927+ security :
1928+ - scaleway : []
1929+ x-codeSamples :
1930+ - lang : cURL
1931+ source : |-
1932+ curl -X POST \
1933+ -H "X-Auth-Token: $SCW_SECRET_KEY" \
1934+ -H "Content-Type: application/json" \
1935+ -d '{"project_id":"string"}' \
1936+ "https://api.scaleway.com/qaas/v1alpha1/models"
1937+ - lang : HTTPie
1938+ source : |-
1939+ http POST "https://api.scaleway.com/qaas/v1alpha1/models" \
1940+ X-Auth-Token:$SCW_SECRET_KEY \
1941+ project_id="string"
1942+ /qaas/v1alpha1/models/{model_id} :
1943+ get :
1944+ tags :
1945+ - Models
1946+ operationId : GetModel
1947+ summary : Get model information
1948+ description : Retrieve information about of the provided **model ID**.
1949+ parameters :
1950+ - in : path
1951+ name : model_id
1952+ description : Unique ID of the model.
1953+ required : true
1954+ schema :
1955+ type : string
1956+ description : Unique ID of the model.
1957+ responses :
1958+ " 200 " :
1959+ description : " "
1960+ content :
1961+ application/json :
1962+ schema :
1963+ $ref : ' #/components/schemas/scaleway.qaas.v1alpha1.Model'
1964+ security :
1965+ - scaleway : []
1966+ x-codeSamples :
1967+ - lang : cURL
1968+ source : |-
1969+ curl -X GET \
1970+ -H "X-Auth-Token: $SCW_SECRET_KEY" \
1971+ "https://api.scaleway.com/qaas/v1alpha1/models/{model_id}"
1972+ - lang : HTTPie
1973+ source : |-
1974+ http GET "https://api.scaleway.com/qaas/v1alpha1/models/{model_id}" \
1975+ X-Auth-Token:$SCW_SECRET_KEY
17681976 /qaas/v1alpha1/platforms :
17691977 get :
17701978 tags :
@@ -2438,6 +2646,11 @@ paths:
24382646 - started_at
24392647 - finished_at
24402648 - description
2649+ model_id :
2650+ type : string
2651+ description : Default computation model ID to be executed by job
2652+ assigned to this session.
2653+ nullable : true
24412654 required :
24422655 - project_id
24432656 - platform_id
@@ -2450,6 +2663,7 @@ paths:
24502663 - tags
24512664 - deduplication_id
24522665 - booking_demand
2666+ - model_id
24532667 security :
24542668 - scaleway : []
24552669 x-codeSamples :
0 commit comments