Skip to content

Commit 1dadd95

Browse files
authored
Merge pull request #59 from glideapps/api-update-glide-pr-34717
2 parents 6d33f77 + 84a0269 commit 1dadd95

File tree

1 file changed

+236
-0
lines changed

1 file changed

+236
-0
lines changed

openapi/swagger.json

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,242 @@
561561
"description": "Creates a new Big Table"
562562
}
563563
},
564+
"/tables/import": {
565+
"post": {
566+
"responses": {
567+
"201": {
568+
"description": "",
569+
"content": {
570+
"application/json": {
571+
"schema": {
572+
"type": "object",
573+
"properties": {
574+
"data": {
575+
"type": "array",
576+
"items": {
577+
"type": "object",
578+
"properties": {
579+
"tableID": {
580+
"type": "string",
581+
"description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`",
582+
"example": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
583+
},
584+
"rowIDs": {
585+
"type": "array",
586+
"items": {
587+
"type": "string",
588+
"description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`",
589+
"example": "zcJWnyI8Tbam21V34K8MNA"
590+
},
591+
"description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```",
592+
"example": [
593+
"zcJWnyI8Tbam21V34K8MNA",
594+
"93a19-cf7c-44437-b8c1-e9acbbb"
595+
]
596+
},
597+
"linkedAppIDs": {
598+
"type": "array",
599+
"items": {
600+
"type": "string"
601+
},
602+
"description": "An array of appIDs which were successfully linked."
603+
}
604+
},
605+
"required": [
606+
"tableID",
607+
"rowIDs"
608+
],
609+
"additionalProperties": false
610+
}
611+
}
612+
},
613+
"required": [
614+
"data"
615+
],
616+
"additionalProperties": false
617+
}
618+
}
619+
}
620+
},
621+
"400": {
622+
"description": "",
623+
"content": {
624+
"application/json": {
625+
"schema": {
626+
"type": "object",
627+
"properties": {
628+
"error": {
629+
"type": "object",
630+
"properties": {
631+
"type": {
632+
"type": "string"
633+
},
634+
"message": {
635+
"type": "string"
636+
}
637+
},
638+
"required": [
639+
"type",
640+
"message"
641+
],
642+
"additionalProperties": false
643+
}
644+
},
645+
"required": [
646+
"error"
647+
],
648+
"additionalProperties": false
649+
}
650+
}
651+
}
652+
},
653+
"402": {
654+
"description": "",
655+
"content": {
656+
"application/json": {
657+
"schema": {
658+
"type": "object",
659+
"properties": {
660+
"error": {
661+
"type": "object",
662+
"properties": {
663+
"type": {
664+
"type": "string",
665+
"enum": [
666+
"payment_required"
667+
]
668+
},
669+
"message": {
670+
"type": "string"
671+
}
672+
},
673+
"required": [
674+
"type",
675+
"message"
676+
],
677+
"additionalProperties": false
678+
}
679+
},
680+
"required": [
681+
"error"
682+
],
683+
"additionalProperties": false
684+
}
685+
}
686+
}
687+
},
688+
"422": {
689+
"description": "",
690+
"content": {
691+
"application/json": {
692+
"schema": {
693+
"type": "object",
694+
"properties": {
695+
"error": {
696+
"type": "object",
697+
"properties": {
698+
"type": {
699+
"type": "string",
700+
"enum": [
701+
"column_id_reserved",
702+
"column_id_not_unique",
703+
"column_has_invalid_value",
704+
"column_id_not_found"
705+
]
706+
},
707+
"message": {
708+
"type": "string"
709+
}
710+
},
711+
"required": [
712+
"type",
713+
"message"
714+
],
715+
"additionalProperties": false
716+
}
717+
},
718+
"required": [
719+
"error"
720+
],
721+
"additionalProperties": false
722+
}
723+
}
724+
}
725+
}
726+
},
727+
"parameters": [
728+
{
729+
"name": "appsToLink",
730+
"in": "query",
731+
"schema": {
732+
"type": "array",
733+
"items": {
734+
"type": "string"
735+
},
736+
"description": "An array of app IDs to link the new table to."
737+
},
738+
"required": false
739+
},
740+
{
741+
"name": "onSchemaError",
742+
"in": "query",
743+
"schema": {
744+
"type": "string",
745+
"enum": [
746+
"abort",
747+
"dropColumns",
748+
"updateSchema"
749+
],
750+
"description": "The action to take when the passed data does not match the table schema:\n\n- `abort`: Abort the entire operation and return an error.\n- `dropColumns`: Ignore the data that caused the error, and do not import those columns in the affected rows.\n- `updateSchema`: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.",
751+
"example": "updateSchema"
752+
},
753+
"required": false
754+
}
755+
],
756+
"requestBody": {
757+
"content": {
758+
"application/json": {
759+
"schema": {
760+
"type": "object",
761+
"properties": {
762+
"fromUrl": {
763+
"type": "string",
764+
"format": "uri",
765+
"description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body."
766+
},
767+
"appsToLink": {
768+
"type": "array",
769+
"items": {
770+
"type": "string"
771+
},
772+
"description": "An array of app IDs to link the new table to."
773+
}
774+
},
775+
"required": [
776+
"fromUrl"
777+
],
778+
"additionalProperties": false
779+
}
780+
},
781+
"text/csv": {
782+
"schema": {
783+
"type": "string",
784+
"description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.",
785+
"example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z"
786+
}
787+
},
788+
"text/tab-separated-values": {
789+
"schema": {
790+
"type": "string",
791+
"description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.",
792+
"example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z"
793+
}
794+
}
795+
}
796+
},
797+
"description": "Creates a new Big Table from a URL"
798+
}
799+
},
564800
"/tables/{tableID}": {
565801
"put": {
566802
"responses": {

0 commit comments

Comments
 (0)