Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell EMC SmartFabric OS10 User Guide Release 10.5.0

RESTCONF API tasks

Using the RESTCONF API, you can provision OS10 switches using HTTPS requests. The examples in this section show how to access the OS10 RESTCONF API using curl commands. curl is a Linux shell command that generates HTTPS requests and is executed on an external server.

Restconf API

curl Commands

curl command options include:
  • -X specifies the HTTPS request type; for example, POST , PATCH, or GET.
  • -u specifies the user name and password to use for server authentication.
  • -k specifies a text file to read curl arguments from. The command line arguments found in the text file will be used as if they were provided on the command line. Use the IP address or URL of the OS10 switch when you access the OS10 RESTCONF API from a remote orchestration system.
  • -H specifies an extra header to include in the request when sending HTTPS to a server. You can enter multiple extra headers.
  • -d sends the specified data in an HTTPS request.

In curl commands, use %2F to represent a backslash (/); for example, enter ethernet1/2/3 as ethernet1%2F1%2F3.

Usage Information

Consider the following when accessing OS10 RESTCONF API using curl commands:

  • Dell EMC recommends using a specific URI of the target resource for GET queries in a scaled system. For example, curl -X GET -k -u admin:admin -H "accept:application/json" https://$TARGET/restconf/data/interfaces/interface/port-channel10

    OS10 does not support REST queries on the root resource of the RESTCONF datastore. For example, the GET query, curl -X GET -k -u admin:admin https://$TARGET/restconf/data returns an error.

  • When a RESTCONF query is in progress, you cannot configure any CLI commands until a RESTCONF query is complete.

  • It is recommended to use POST request instead of PUT, to replace the target data resources.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\