Skip to content

Commit 05c14d7

Browse files
committed
feat(docs): add glob and grep endpoints for artifact search
1 parent 1eb564c commit 05c14d7

4 files changed

Lines changed: 453 additions & 0 deletions

File tree

docs/api-reference/openapi.json

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,100 @@
678678
"x-codegen-request-body-name" : "request"
679679
}
680680
},
681+
"/disk/{disk_id}/artifact/glob" : {
682+
"get" : {
683+
"description" : "Search through artifact file paths using glob patterns (*, ?, etc.)",
684+
"parameters" : [ {
685+
"description" : "Disk ID",
686+
"in" : "path",
687+
"name" : "disk_id",
688+
"required" : true,
689+
"schema" : {
690+
"format" : "uuid",
691+
"type" : "string"
692+
}
693+
}, {
694+
"description" : "Glob pattern (e.g., '**/*.py', '*.txt')",
695+
"in" : "query",
696+
"name" : "query",
697+
"required" : true,
698+
"schema" : {
699+
"type" : "string"
700+
}
701+
}, {
702+
"description" : "Maximum number of results (default 100, max 1000)",
703+
"in" : "query",
704+
"name" : "limit",
705+
"schema" : {
706+
"type" : "integer"
707+
}
708+
} ],
709+
"responses" : {
710+
"200" : {
711+
"content" : {
712+
"application/json" : {
713+
"schema" : {
714+
"$ref" : "#/components/schemas/_disk__disk_id__artifact_glob_get_200_response"
715+
}
716+
}
717+
},
718+
"description" : "OK"
719+
}
720+
},
721+
"security" : [ {
722+
"BearerAuth" : [ ]
723+
} ],
724+
"summary" : "Search artifact paths with glob patterns",
725+
"tags" : [ "artifact" ]
726+
}
727+
},
728+
"/disk/{disk_id}/artifact/grep" : {
729+
"get" : {
730+
"description" : "Search through text-based artifact content using regex patterns",
731+
"parameters" : [ {
732+
"description" : "Disk ID",
733+
"in" : "path",
734+
"name" : "disk_id",
735+
"required" : true,
736+
"schema" : {
737+
"format" : "uuid",
738+
"type" : "string"
739+
}
740+
}, {
741+
"description" : "Regex pattern to search for",
742+
"in" : "query",
743+
"name" : "query",
744+
"required" : true,
745+
"schema" : {
746+
"type" : "string"
747+
}
748+
}, {
749+
"description" : "Maximum number of results (default 100, max 1000)",
750+
"in" : "query",
751+
"name" : "limit",
752+
"schema" : {
753+
"type" : "integer"
754+
}
755+
} ],
756+
"responses" : {
757+
"200" : {
758+
"content" : {
759+
"application/json" : {
760+
"schema" : {
761+
"$ref" : "#/components/schemas/_disk__disk_id__artifact_glob_get_200_response"
762+
}
763+
}
764+
},
765+
"description" : "OK"
766+
}
767+
},
768+
"security" : [ {
769+
"BearerAuth" : [ ]
770+
} ],
771+
"summary" : "Search artifact content with regex",
772+
"tags" : [ "artifact" ]
773+
}
774+
},
681775
"/disk/{disk_id}/artifact/ls" : {
682776
"get" : {
683777
"description" : "List artifacts in a specific path or all artifacts in a disk",
@@ -3472,6 +3566,21 @@
34723566
"type" : "object"
34733567
} ]
34743568
},
3569+
"_disk__disk_id__artifact_glob_get_200_response" : {
3570+
"allOf" : [ {
3571+
"$ref" : "#/components/schemas/serializer.Response"
3572+
}, {
3573+
"properties" : {
3574+
"data" : {
3575+
"items" : {
3576+
"$ref" : "#/components/schemas/model.Artifact"
3577+
},
3578+
"type" : "array"
3579+
}
3580+
},
3581+
"type" : "object"
3582+
} ]
3583+
},
34753584
"_disk__disk_id__artifact_ls_get_200_response" : {
34763585
"allOf" : [ {
34773586
"$ref" : "#/components/schemas/serializer.Response"

src/server/api/go/docs/docs.go

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,138 @@ const docTemplate = `{
954954
]
955955
}
956956
},
957+
"/disk/{disk_id}/artifact/glob": {
958+
"get": {
959+
"security": [
960+
{
961+
"BearerAuth": []
962+
}
963+
],
964+
"description": "Search through artifact file paths using glob patterns (*, ?, etc.)",
965+
"consumes": [
966+
"application/json"
967+
],
968+
"produces": [
969+
"application/json"
970+
],
971+
"tags": [
972+
"artifact"
973+
],
974+
"summary": "Search artifact paths with glob patterns",
975+
"parameters": [
976+
{
977+
"type": "string",
978+
"format": "uuid",
979+
"description": "Disk ID",
980+
"name": "disk_id",
981+
"in": "path",
982+
"required": true
983+
},
984+
{
985+
"type": "string",
986+
"description": "Glob pattern (e.g., '**/*.py', '*.txt')",
987+
"name": "query",
988+
"in": "query",
989+
"required": true
990+
},
991+
{
992+
"type": "integer",
993+
"description": "Maximum number of results (default 100, max 1000)",
994+
"name": "limit",
995+
"in": "query"
996+
}
997+
],
998+
"responses": {
999+
"200": {
1000+
"description": "OK",
1001+
"schema": {
1002+
"allOf": [
1003+
{
1004+
"$ref": "#/definitions/serializer.Response"
1005+
},
1006+
{
1007+
"type": "object",
1008+
"properties": {
1009+
"data": {
1010+
"type": "array",
1011+
"items": {
1012+
"$ref": "#/definitions/model.Artifact"
1013+
}
1014+
}
1015+
}
1016+
}
1017+
]
1018+
}
1019+
}
1020+
}
1021+
}
1022+
},
1023+
"/disk/{disk_id}/artifact/grep": {
1024+
"get": {
1025+
"security": [
1026+
{
1027+
"BearerAuth": []
1028+
}
1029+
],
1030+
"description": "Search through text-based artifact content using regex patterns",
1031+
"consumes": [
1032+
"application/json"
1033+
],
1034+
"produces": [
1035+
"application/json"
1036+
],
1037+
"tags": [
1038+
"artifact"
1039+
],
1040+
"summary": "Search artifact content with regex",
1041+
"parameters": [
1042+
{
1043+
"type": "string",
1044+
"format": "uuid",
1045+
"description": "Disk ID",
1046+
"name": "disk_id",
1047+
"in": "path",
1048+
"required": true
1049+
},
1050+
{
1051+
"type": "string",
1052+
"description": "Regex pattern to search for",
1053+
"name": "query",
1054+
"in": "query",
1055+
"required": true
1056+
},
1057+
{
1058+
"type": "integer",
1059+
"description": "Maximum number of results (default 100, max 1000)",
1060+
"name": "limit",
1061+
"in": "query"
1062+
}
1063+
],
1064+
"responses": {
1065+
"200": {
1066+
"description": "OK",
1067+
"schema": {
1068+
"allOf": [
1069+
{
1070+
"$ref": "#/definitions/serializer.Response"
1071+
},
1072+
{
1073+
"type": "object",
1074+
"properties": {
1075+
"data": {
1076+
"type": "array",
1077+
"items": {
1078+
"$ref": "#/definitions/model.Artifact"
1079+
}
1080+
}
1081+
}
1082+
}
1083+
]
1084+
}
1085+
}
1086+
}
1087+
}
1088+
},
9571089
"/disk/{disk_id}/artifact/ls": {
9581090
"get": {
9591091
"security": [

0 commit comments

Comments
 (0)