The cURL command is used to make HTTP requests from the command line. To retrieve a resource in JSON format using OAuth, the command must include the following:
Authorization header: Use the -H option to include the OAuth access token for authentication.
Accept header: Specify that the response should be in JSON format by using the -H option with Accept: application/json.
URL: Provide the URL of the API endpoint.
This command retrieves the specified resource from the API, using the provided OAuth token to authenticate the request and requesting the response in JSON format.
[Reference: Cisco DevNet REST API Documentation, , , ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit