|
2 | 2 | "openapi": "3.1.0",
|
3 | 3 | "info": {
|
4 | 4 | "title": "LangWatch API",
|
5 |
| - "version": "1.0.0" |
| 5 | + "version": "1.0.0", |
| 6 | + "description": "LangWatch openapi spec" |
6 | 7 | },
|
7 | 8 | "servers": [
|
8 | 9 | {
|
|
796 | 797 | }
|
797 | 798 | }
|
798 | 799 | },
|
799 |
| - |
800 | 800 | "/api/dataset/{slug}/entries": {
|
801 | 801 | "post": {
|
802 | 802 | "responses": {},
|
|
822 | 822 | }
|
823 | 823 | }
|
824 | 824 | }
|
| 825 | + }, |
| 826 | + "/api/prompts": { |
| 827 | + "get": { |
| 828 | + "responses": {}, |
| 829 | + "operationId": "getApiPrompts", |
| 830 | + "parameters": [], |
| 831 | + "description": "Get all prompts for a project" |
| 832 | + }, |
| 833 | + "post": { |
| 834 | + "responses": {}, |
| 835 | + "operationId": "postApiPrompts", |
| 836 | + "parameters": [], |
| 837 | + "description": "Create a new prompt", |
| 838 | + "requestBody": { |
| 839 | + "content": { |
| 840 | + "application/json": { |
| 841 | + "schema": { |
| 842 | + "type": "object", |
| 843 | + "properties": { |
| 844 | + "name": { |
| 845 | + "type": "string", |
| 846 | + "minLength": 1 |
| 847 | + } |
| 848 | + }, |
| 849 | + "required": ["name"] |
| 850 | + } |
| 851 | + } |
| 852 | + } |
| 853 | + } |
| 854 | + } |
| 855 | + }, |
| 856 | + "/api/prompts/{id}": { |
| 857 | + "get": { |
| 858 | + "responses": {}, |
| 859 | + "operationId": "getApiPromptsById", |
| 860 | + "parameters": [ |
| 861 | + { |
| 862 | + "schema": { |
| 863 | + "type": "string" |
| 864 | + }, |
| 865 | + "in": "path", |
| 866 | + "name": "id", |
| 867 | + "required": true |
| 868 | + } |
| 869 | + ], |
| 870 | + "description": "Get a specific prompt" |
| 871 | + }, |
| 872 | + "put": { |
| 873 | + "responses": {}, |
| 874 | + "operationId": "putApiPromptsById", |
| 875 | + "parameters": [ |
| 876 | + { |
| 877 | + "schema": { |
| 878 | + "type": "string" |
| 879 | + }, |
| 880 | + "in": "path", |
| 881 | + "name": "id", |
| 882 | + "required": true |
| 883 | + } |
| 884 | + ], |
| 885 | + "description": "Update a prompt", |
| 886 | + "requestBody": { |
| 887 | + "content": { |
| 888 | + "application/json": { |
| 889 | + "schema": { |
| 890 | + "type": "object", |
| 891 | + "properties": { |
| 892 | + "name": { |
| 893 | + "type": "string", |
| 894 | + "minLength": 1 |
| 895 | + } |
| 896 | + } |
| 897 | + } |
| 898 | + } |
| 899 | + } |
| 900 | + } |
| 901 | + }, |
| 902 | + "delete": { |
| 903 | + "responses": {}, |
| 904 | + "operationId": "deleteApiPromptsById", |
| 905 | + "parameters": [ |
| 906 | + { |
| 907 | + "schema": { |
| 908 | + "type": "string" |
| 909 | + }, |
| 910 | + "in": "path", |
| 911 | + "name": "id", |
| 912 | + "required": true |
| 913 | + } |
| 914 | + ], |
| 915 | + "description": "Delete a prompt" |
| 916 | + } |
| 917 | + }, |
| 918 | + "/api/prompts/{id}/versions": { |
| 919 | + "get": { |
| 920 | + "responses": {}, |
| 921 | + "operationId": "getApiPromptsByIdVersions", |
| 922 | + "parameters": [ |
| 923 | + { |
| 924 | + "schema": { |
| 925 | + "type": "string" |
| 926 | + }, |
| 927 | + "in": "path", |
| 928 | + "name": "id", |
| 929 | + "required": true |
| 930 | + } |
| 931 | + ], |
| 932 | + "description": "Get all versions for a prompt" |
| 933 | + }, |
| 934 | + "post": { |
| 935 | + "responses": {}, |
| 936 | + "operationId": "postApiPromptsByIdVersions", |
| 937 | + "parameters": [ |
| 938 | + { |
| 939 | + "schema": { |
| 940 | + "type": "string" |
| 941 | + }, |
| 942 | + "in": "path", |
| 943 | + "name": "id", |
| 944 | + "required": true |
| 945 | + } |
| 946 | + ], |
| 947 | + "description": "Create a new version for a prompt", |
| 948 | + "requestBody": { |
| 949 | + "content": { |
| 950 | + "application/json": { |
| 951 | + "schema": { |
| 952 | + "type": "object", |
| 953 | + "properties": { |
| 954 | + "authorId": { |
| 955 | + "type": ["string", "null"] |
| 956 | + }, |
| 957 | + "projectId": { |
| 958 | + "type": "string", |
| 959 | + "minLength": 1 |
| 960 | + }, |
| 961 | + "configId": { |
| 962 | + "type": "string", |
| 963 | + "minLength": 1 |
| 964 | + }, |
| 965 | + "schemaVersion": { |
| 966 | + "type": "string", |
| 967 | + "const": "1.0" |
| 968 | + }, |
| 969 | + "commitMessage": { |
| 970 | + "type": "string" |
| 971 | + }, |
| 972 | + "configData": { |
| 973 | + "type": "object", |
| 974 | + "properties": { |
| 975 | + "version": { |
| 976 | + "type": "string", |
| 977 | + "const": "1.0" |
| 978 | + }, |
| 979 | + "prompt": { |
| 980 | + "type": "string", |
| 981 | + "minLength": 1 |
| 982 | + }, |
| 983 | + "model": { |
| 984 | + "type": "string", |
| 985 | + "minLength": 1 |
| 986 | + }, |
| 987 | + "inputs": { |
| 988 | + "type": "array", |
| 989 | + "items": { |
| 990 | + "type": "object", |
| 991 | + "properties": { |
| 992 | + "identifier": { |
| 993 | + "type": "string", |
| 994 | + "minLength": 1 |
| 995 | + }, |
| 996 | + "type": { |
| 997 | + "type": "string", |
| 998 | + "minLength": 1 |
| 999 | + } |
| 1000 | + }, |
| 1001 | + "required": ["identifier", "type"] |
| 1002 | + }, |
| 1003 | + "minItems": 1 |
| 1004 | + }, |
| 1005 | + "outputs": { |
| 1006 | + "type": "array", |
| 1007 | + "items": { |
| 1008 | + "type": "object", |
| 1009 | + "properties": { |
| 1010 | + "identifier": { |
| 1011 | + "type": "string", |
| 1012 | + "minLength": 1 |
| 1013 | + }, |
| 1014 | + "type": { |
| 1015 | + "type": "string", |
| 1016 | + "minLength": 1 |
| 1017 | + } |
| 1018 | + }, |
| 1019 | + "required": ["identifier", "type"] |
| 1020 | + }, |
| 1021 | + "minItems": 1 |
| 1022 | + }, |
| 1023 | + "demonstrations": { |
| 1024 | + "type": "object", |
| 1025 | + "properties": { |
| 1026 | + "columns": { |
| 1027 | + "type": "array", |
| 1028 | + "items": { |
| 1029 | + "type": "object", |
| 1030 | + "properties": { |
| 1031 | + "name": { |
| 1032 | + "type": "string", |
| 1033 | + "minLength": 1 |
| 1034 | + }, |
| 1035 | + "type": { |
| 1036 | + "type": "string", |
| 1037 | + "minLength": 1 |
| 1038 | + } |
| 1039 | + }, |
| 1040 | + "required": ["name", "type"] |
| 1041 | + } |
| 1042 | + }, |
| 1043 | + "rows": { |
| 1044 | + "type": "array", |
| 1045 | + "items": { |
| 1046 | + "type": "object", |
| 1047 | + "additionalProperties": {} |
| 1048 | + }, |
| 1049 | + "default": [] |
| 1050 | + } |
| 1051 | + }, |
| 1052 | + "required": ["columns"] |
| 1053 | + } |
| 1054 | + }, |
| 1055 | + "required": [ |
| 1056 | + "version", |
| 1057 | + "prompt", |
| 1058 | + "model", |
| 1059 | + "inputs", |
| 1060 | + "outputs", |
| 1061 | + "demonstrations" |
| 1062 | + ] |
| 1063 | + } |
| 1064 | + }, |
| 1065 | + "required": [ |
| 1066 | + "authorId", |
| 1067 | + "projectId", |
| 1068 | + "configId", |
| 1069 | + "schemaVersion", |
| 1070 | + "commitMessage", |
| 1071 | + "configData" |
| 1072 | + ] |
| 1073 | + } |
| 1074 | + } |
| 1075 | + } |
| 1076 | + } |
| 1077 | + } |
825 | 1078 | }
|
826 | 1079 | },
|
827 | 1080 | "components": {
|
|
1102 | 1355 | }
|
1103 | 1356 | }
|
1104 | 1357 | },
|
1105 |
| - |
1106 | 1358 | "DatasetPostEntries": {
|
1107 | 1359 | "type": "object",
|
1108 | 1360 | "properties": {
|
|
0 commit comments