-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-clients-http-request-structure.json
More file actions
161 lines (161 loc) · 4.43 KB
/
Copy pathapi-clients-http-request-structure.json
File metadata and controls
161 lines (161 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://raw.githubusercontent.com/api-evangelist/api-clients/refs/heads/main/json-structure/api-clients-http-request-structure.json",
"name": "HTTPRequest",
"description": "A single HTTP request as represented inside an API client tool such as Postman, Insomnia, Bruno, or Hoppscotch. Captures method, URL, headers, query parameters, body, authentication, and client-specific metadata needed to replay the request.",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable identifier for the request within a collection.",
"example": "req_8f3a2c1d-list-users"
},
"name": {
"type": "string",
"description": "Human-readable name for the request as shown in the client UI.",
"example": "List Users"
},
"method": {
"type": "string",
"description": "HTTP method of the request.",
"enum": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE",
"HEAD",
"OPTIONS",
"TRACE"
],
"example": "GET"
},
"url": {
"type": "uri",
"description": "Full request URL with variable placeholders expanded against the active environment.",
"example": "https://api.example.com/v1/users"
},
"headers": {
"type": "array",
"description": "Ordered list of HTTP request headers.",
"items": {
"type": "object",
"properties": {
"name": { "type": "string", "example": "Accept" },
"value": { "type": "string", "example": "application/json" },
"disabled": { "type": "boolean", "example": false }
},
"required": [
"name",
"value"
]
}
},
"query": {
"type": "array",
"description": "Query string parameters appended to the URL.",
"items": {
"type": "object",
"properties": {
"name": { "type": "string", "example": "limit" },
"value": { "type": "string", "example": "25" },
"disabled": { "type": "boolean", "example": false }
},
"required": [
"name",
"value"
]
}
},
"body": {
"type": "object",
"description": "Request body, with mode indicating how the client should serialize it.",
"properties": {
"mode": {
"type": "string",
"enum": [
"none",
"raw",
"json",
"form-data",
"urlencoded",
"binary",
"graphql"
],
"example": "json"
},
"raw": { "type": "string", "example": "{\"name\":\"Jane\"}" },
"mediaType": { "type": "string", "example": "application/json" }
}
},
"auth": {
"type": "object",
"description": "Authentication configuration applied to the request.",
"properties": {
"type": {
"type": "string",
"enum": [
"none",
"inherit",
"bearer",
"apikey",
"basic",
"digest",
"oauth2",
"aws-sigv4",
"ntlm",
"hawk"
],
"example": "bearer"
}
}
},
"protocol": {
"type": "string",
"description": "Wire protocol for the request. Most clients support more than plain HTTP/REST.",
"enum": [
"http",
"https",
"graphql",
"grpc",
"websocket",
"sse",
"mqtt",
"soap"
],
"example": "https"
},
"tests": {
"type": "array",
"description": "Assertions or scripts executed against the response after the request runs.",
"items": {
"type": "object",
"properties": {
"name": { "type": "string", "example": "status is 200" },
"script": { "type": "string", "example": "pm.test('200', () => pm.response.to.have.status(200));" },
"language": {
"type": "string",
"enum": [
"javascript",
"python",
"lua",
"hurl",
"yaml"
],
"example": "javascript"
}
}
}
},
"client": {
"type": "string",
"description": "API client tool that produced this request representation.",
"example": "postman"
}
},
"required": [
"name",
"method",
"url"
]
}