Accessing Smart-enabled API
This guide will walk you through the steps needed to access and use the Smart-enabled API. To begin, you will need the following credentials and information:
CLIENT_ID
CLIENT_SECRET
You will receive your CLIENT_ID and CLIENT_SECRET once your access to the API has been granted.
Step 1: Obtain a JWT Token
Before you can make API calls, you need to log in and obtain a JWT (JSON Web Token) to authenticate future requests.
Login Request
Make a POST request to the login URL to get the JWT token:
Endpoint:
POST https://auth.smart.iec.ch/realms/iec/protocol/openid-connect/token
Request Body (URL Encoded)
client_id:Your client ID
client_secret:Your client secret
grant_type: client_credentials
scope: openid
This will return a JWT token, which is used for authenticating subsequent API requests.
Step 2: Making API Calls
Once you have obtained the JWT token, you can make API requests. You need to include the token in the Authorization header as a Bearer token.
Example: Get List of Standards
To fetch a list of standards, you can use the following GET request.
Endpoint:
GET https://sim-apim.azure-api.net/preprod/v1/standards?limit=5&offset=0Request Headers:
Authorization:Bearer {your JWT token}
Accept: application/ld+json
Query Parameters:
offset:0
limit:5
With this setup, you should be able to access and interact with the Smart-enabled API successfully.