-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCRM_API.http
More file actions
91 lines (56 loc) · 2.59 KB
/
CRM_API.http
File metadata and controls
91 lines (56 loc) · 2.59 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
# This file can be used with the REST Client VSCode Extension
# @see https://marketplace.visualstudio.com/items?itemName=humao.rest-client
#################################################################################
@apiBasePath = http://localhost:8080
# @apiBasePath = https://ord-reference-application.cfapps.sap.hana.ondemand.com/
@apiMediaType = application/json
# User: foo
@apiAuthorization = Basic Zm9vOmJhcg==
# User: bar
# @apiAuthorization = Basic YmFyOmZvbw==
# TenantIDs for Tenant T1
@sapGlobalTenantId = 740000101
# TenantIDs for Tenant T2
# @sapGlobalTenantId = 5740000102
#################################################################################
# Get all customers
GET {{apiBasePath}}/crm/v1/customers HTTP/1.1
content-type: application/json
Authorization: {{apiAuthorization}}
#################################################################################
# Get all customers (via basicAuth provided within URL)
GET http://foo:bar@localhost:8080/crm/v1/customers HTTP/1.1
content-type: application/json
#################################################################################
# Get an existing customer
GET {{apiBasePath}}/crm/v1/customers/1 HTTP/1.1
content-type: application/json
Authorization: {{apiAuthorization}}
#################################################################################
# Get a non-existing customer
GET {{apiBasePath}}/crm/v1/customers/512 HTTP/1.1
content-type: application/json
Authorization: {{apiAuthorization}}
#################################################################################
# Invalid request with ID not matching constraints
GET {{apiBasePath}}/crm/v1/customers/-1 HTTP/1.1
content-type: application/json
Authorization: {{apiAuthorization}}
#################################################################################
# Request without Authorization
GET {{apiBasePath}}/crm/v1/customers HTTP/1.1
content-type: application/json
#################################################################################
# Request with unknown username / password
GET {{apiBasePath}}/crm/v1/customers HTTP/1.1
content-type: application/json
Authorization: Basic ZnJpdHo6MTIzNDU2
#################################################################################
# Request for unknown route / resource
GET {{apiBasePath}}/crm/v1/unkownResource HTTP/1.1
content-type: application/json
#################################################################################
# Get OpenAPI Definition for the API
GET {{apiBasePath}}/crm/v1/openapi/oas3.json HTTP/1.1
content-type: application/json
global-tenant-id: {{sapGlobalTenantId}}