Work with your REST Client
Note:
Oracle REST APIs are not OData (Open Data Protocol) compliant.Considerations for Choosing a REST Client
You can choose among many clients that interact with Fusion Supply Chain Management applications, such as:
-
A standalone client, such as Postman or Advanced REST Client
-
Your connecting application's client
Note:
If you're using Visual Builder Studio to access REST APIs, see Create a Service Connection from a Service Specification. To access REST APIs using Oracle Integration Cloud, see Configure the REST Adapter to Consume an External REST API with No Metadata Described in a Document. You can also build your own client to access REST resources. To build a client using the Java programming language, see Accessing REST Resources with the JAX-RS Client API. -
The cURL command-line utility
You can use the client to do the following tasks:
-
Test the username, password, and request URL for your REST API account.
-
Perform
view
anddescribe
actions to learn more about REST resources, attributes, and parameters. -
Use the collected information to construct and send various types of HTTP requests, such as those to create, update, or delete records.
How You Send HTTP Requests Using cURL
In our examples, we use cURL, a popular command-line utility for transferring data using URL syntax, to send requests to REST services. cURL is available in most UNIX, Windows, and Macintosh environments. For details, see Installing the cURL Command-Line Tool on Windows.
The following table describes commonly used cURL options that you can use for REST services.
Option | Description |
---|---|
-user |
Specifies the user name and password for server authentication. |
-d |
Sends the specified data (a JSON request body) to the server. If you begin the data with the @ sign, then @ must be followed by a file name to read the data from. |
-H |
Specifies an extra HTTP header in the request. To specify multiple headers, precede each header with the Examples:
|
-output |
Writes the output to a file instead of to |
-X |
Specifies the request method to use when communicating with the HTTP server. The default method is GET. |
The following table shows examples of the GET, PATCH, and POST operations using cURL.
Operation | cURL Command Example |
---|---|
Use |
|
Use |
|
Use |
|
How You Send HTTP Requests Using Clients
You can use standalone clients, third-party browser extensions, or add-ons, such as the Advanced REST Client, to send HTTP requests. The following table includes examples of the GET, POST, and PATCH operations using a client.
Operation | Response/Payload Example |
---|---|
GET: Get a collaboration planner. Request URL: |
|
POST: Create a collaboration planner. Request URL: |
|
PATCH: Update a collaboration planner. Request URL: |
|
With an understanding of how your client works, you can next review Getting and Patching Collaboration Planners for a sample workflow that demonstrates how to get and patch collaboration relationships.