Skip to content

Commit 1daf26c

Browse files
committed
Add a Postman REST request sample for OAG
1 parent c956cf2 commit 1daf26c

File tree

3 files changed

+481
-0
lines changed

3 files changed

+481
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2025 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Oracle Access Governance REST Postman Request Samples
2+
3+
A Postman collection of sample REST API requests for Oracle Access Governance (OAG) that showcases the ability to submit requests, trigger guardrail violations and interrogate OAG objects using REST API calls. Note that these samples are meant for reference only and are not intended for use in production systems.
4+
5+
Review Date: 12.09.2025
6+
7+
# When to use this asset?
8+
9+
The collection can be used for demonstration purposes, to showcase the REST API capabilities of OAG or as a general reference in OAG request automation. This provides a streamlined approach to the more hardcoded flow described in the following Developer Coaching session: https://www.youtube.com/watch?v=bDUIrKldGU0
10+
11+
# How to use this asset?
12+
13+
## Pre-requisites
14+
15+
- The prerequisites section of the OAG REST API integration document must be followed in order to set up a client credentials authentication flow. More details at: https://docs.oracle.com/en/cloud/paas/access-governance/pmapi/prerequisites.html
16+
- The collection relies on collection variables in order to properly construct the REST queries. Before running any of the queries please ensure you update the `{{ociiam_url}}` and `{{oag_url}}` variables in order to point to the OIG environment you intend to use. These URLs are the same values you have used in the configuration step above. In order to do that, access the "Variables" tab by first clicking on the Postman collection name. Feel free to also update the `{{beneficiary_filter}}` and `{{beneficiary_filter_violation}}` values as per your needs - these will be used as filters in the ID identification of the users who will act as beneficiaries for the two submitted access requests.
17+
- Open the "Authorization" tab of the "Get Authorization Token" request and update the credentials with the client ID and client secret generated during the setup of the client credentials authentication flow. Note that Postman will automatically handle the required base64 encoding for you once you've filled in those details.
18+
19+
## Executing the queries
20+
21+
- Make sure you run the queries in sequence, as you will first need a valid `{{access_token}}`, then IDs for the access bundle used in the request, the associated access guardrail, and the two users: one that will trigger the access guardrail violation and one that will not. Note that it is up to you to set up the user details and access guardrail rule in such a way that the violation is triggered and the access requests are rejected during those API calls. For more details on how to do that please consult the Developer Coaching session video shared above.
22+
- Note that the interrogation REST calls extracting the IDs for the access bundle and access guardrail will always save the first listed ID in the returned list. If this is not the intended behavior in your flow, please update these collection variables manually with the correct ID from the response of the corresponding requests.
23+
- If set up properly, the response of the failed request should contain: `"justification": "Access Request REST API Guardrail Violation Test", "requestStatus": "FAILED"`, whereas the successful request response should contain: `"justification": "Access Request REST API Test", "requestStatus": "IN_PROGRESS"`, assuming the requested access bundle is protected by an approval workflow.
24+
25+
# Useful Links
26+
27+
- [Oracle Access Governance REST API reference](https://docs.oracle.com/en/cloud/paas/access-governance/pmapi/)
28+
- [Postman collections guide](https://learning.postman.com/docs/collections/collections-overview/)
29+
30+
# License
31+
32+
Copyright (c) 2025 Oracle and/or its affiliates.
33+
34+
Licensed under the Universal Permissive License (UPL), Version 1.0.
35+
36+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.

0 commit comments

Comments
 (0)