-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathORD_Document_API.http
More file actions
97 lines (69 loc) · 3.62 KB
/
ORD_Document_API.http
File metadata and controls
97 lines (69 loc) · 3.62 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
# 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/
# TenantIDs for Tenant T1
@localTenantId = T1
@sapGlobalTenantId = 740000101
# TenantIDs for Tenant T2
# @localTenantId = T2
# @sapGlobalTenantId = 740000102
#################################################################################
# First step:
# * Discovery the whether ORD is supported by the system instance
# * Find out which version of ORD and which capabilities are supported
# * Find out which ORD documents are available and where they are stored
GET {{apiBasePath}}/.well-known/open-resource-discovery HTTP/1.1
content-type: application/json
#################################################################################
# Second Step (1/2)
# * REPEAT for each discovered ORD Document:
# * GET the ORD document according to the `accessType` (here: `open`)
GET {{apiBasePath}}/open-resource-discovery/v1/documents/1 HTTP/1.1
content-type: application/json
#################################################################################
# Second Step (2/2)
# * REPEAT for each discovered ORD Document:
# * GET the ORD document according to the `accessType` (here: `custom`)
# * REPEAT this per tenant / system instance because `systemInstanceAware`: true
# We have three choices:
# 1) Provide no tenant ID, then we only get a system instance unaware ORD document back
GET {{apiBasePath}}/open-resource-discovery/v1/documents/2 HTTP/1.1
content-type: application/json
#################################################################################
# 2) Provide global tenant ID that needs to be mapped by this application to its local tenant id
GET {{apiBasePath}}/open-resource-discovery/v1/documents/2 HTTP/1.1
content-type: application/json
global-tenant-id: {{sapGlobalTenantId}}
#################################################################################
# 3) Provide local tenant ID and use it directly
GET {{apiBasePath}}/open-resource-discovery/v1/documents/2 HTTP/1.1
content-type: application/json
local-tenant-id: {{localTenantId}}
#################################################################################
# Third Step (1/2)
# * REPEAT for each discovered and relevant resource definition:
# * GET the resource definition file according to the `accessType` (here: `open`)
GET {{apiBasePath}}/astronomy/v1/openapi/oas3.json HTTP/1.1
content-type: application/json
#################################################################################
# Third Step (2/2)
# * REPEAT for each discovered and relevant resource definition:
# * GET the resource definition file according to the `accessType` (here: `custom`)
GET {{apiBasePath}}/crm/v1/openapi/oas3.json HTTP/1.1
content-type: application/json
global-tenant-id: {{sapGlobalTenantId}}
#################################################################################
# Follow Up
# Now that we have discovered that we have an Astronomy API
# and where / how it is accessed at run-time.
GET {{apiBasePath}}/astronomy/v1/constellations HTTP/1.1
content-type: application/json
#################################################################################
# Addon: RECOMMENDED ETags
# If we send the ETag from a previous request and no changes have been done
# We should get a 304 Not Modified Response
GET {{apiBasePath}}/.well-known/open-resource-discovery HTTP/1.1
content-type: application/json
If-None-Match: "1wzy420"