Skip to main content

The last of the demo videos about using the Syndeia Web Dashboard Generic RESTful API capability uses Vitech GENESYS as an example of dynamic token authentication. Part 5 references the video Demo 29.6 – Integrating RESTful Repositories using Dynamic Token (OAuth) - GENESYS.

This work comes from an ongoing collaboration with Zuken Vitech, creators of the GENESYS system architecture modeling tool. Additional work from this collaboration includes using Jupyter Notebooks to query GENESYS models and a forthcoming full integration in Syndeia release 3.6. For the differences between full and generic RESTful API integrations, see Part 4 in this series.

The Demo 29.6 video follows a similar outline to the others in this series:

  1. Integrating a RESTful repository using a Dynamic Token
  2. Adding and executing RESTful Requests
    1. Get projects in a repository
    2. Get a project by id
    3. Get components in a project
    4. Get requirements in a project

With a dynamic token, the repository generates and returns the token to a request from the user. The Syndeia Generic RESTful API integration will cache this token and use it for subsequent requests. The tokens expire after a fixed time (e.g. 30 minutes) or a period of inactivity (e.g. 2 minutes).  When the token expires, Syndeia will automatically request a new token.

 

Swagger documentation for the GENESYS REST API Figure 1 Swagger documentation for the GENESYS REST API

 

As with the other REST APIs in this series, the Syndeia user must know the integrated repository API’s endpoints. The GENESYS API documentation shown in Figure 1 has separate sections featured in the video, including Authentication, Projects, Entities (e.g. components and requirements), and Schemas (datatypes). The initial endpoint of importance is api/v1/token.

 

Form for updating GENESYS repository connection (url and password obscured)
Figure 2 Form for updating GENESYS repository
connection (url and password obscured)

 

The dynamic token authentication mechanism is somewhat more complex than those described in earlier posts. The user creating or updating the repository connection in the Syndeia Web Dashboard is not entering the token itself, but the information necessary to allow GENESYS to create the token. This includes

  • the URL of the GENESYS repository
  • Name and Description for the repository connection
  • the Authentication type – Dynamic
  • the Method and Path – POST and token (see Figure 1)
  • the Auth URL, if the token generation request needs to go to a different address (optional)
  • three Request Body Key Values
    • grant_type
    • username
    • password
  • the Response Payload Location, the field in the Response that carries the OAuth token
  • the Send Token as Bearer switch, with two positions
    • left, token as bearer (default)
    • right, token as header

After completing this form, click Create or Update to save the repository connection.

The remainder of the video follows the usual pattern of showing how Requests may be specified using the standard template. One non-standard issue is the need for a class or datatype id to identify the type of GENESYS Entity to be queried. These are obtained through a separate call using the /api/v1/projects/{projectId}/schemas endpoint.

The request for Components in a Project returns a complex set of data. Figure 3 shows the first part of the response, including 40 separate components.

 

Response to Get All Components in Drone Design project (top section) Figure 3 Response to Get All Components in Drone Design project (top section)

 

Useful information, such as the name and part number are buried deep in the data set under Attributes, as shown in Figure 4.

 

Response to Get All Components in Drone Design project (expanded attributes section) Figure 4 Response to Get All Components in Drone Design project (expanded attributes section)

 

Because of the need for two API calls, one for type information and one for the data itself, and because of the size of the data set returned, the video suggests that creating a script using a Jupyter notebook with the same API calls is more practical for obtaining the needed information on a regular basis.

In summary, the videos described in this blog series are valuable training guides for any user of the Generic RESTful API integration on the Syndeia Web Dashboard and a useful first step in learning to build your own custom scripts and interfaces using the Syndeia Cloud REST API.

Other parts in this series:

Related Posts

Syndeia AI Agents – Part 1

Hello and welcome to a preview of Syndeia AI, a swarm of AI agents that are powered by Syndeia Cloud. These AI agents can take natural language inputs, fetch latest data from your ...
Manas Bajaj

Santa’s Mission 2024 with 8.2 billion landings made possible by Digital Threads (Day 5)

Santa has just returned from his whirlwind journey, and the workshop erupts in cheers. Elves spill into the command center, their faces glowing with joy and pride as they take in ...
Manas Bajaj

SDS Hardware, Software, and Verification Digital Threads go live (Day 4)

The air hums with the sound of high-tech enchantments and the cheerful chatter of elves hard at work. Twinkling fairy lights hang from the rafters, casting a warm, festive glow. ...
Manas Bajaj

3D Sleigh Assembly model coordinated with System Architecture (Day 3)

It is Day 3 and Tony Sparkgear (Chief-Hardware-Elf) had his team of elves are working hard to create a 3D model in NX parametric software to represent the Sleigh Assembly as shown ...
Manas Bajaj

Sleigh Delivery System – Architecture & Digital Thread Dashboard (Day 2)

It is 7 AM and North Pole is bathing in the first light of dawn reflecting from the snow. The Great Hall, ground zero of operations and logistics, is hustling and bustling with ...
Manas Bajaj

North Pole Calls Intercax for Digital Mission Possible (Day 1)

Today, Intercax received a call from Mrs. Claus, the heart and soul of operations and logistics at North Pole. Seven days from the finale and at a time when hope and love cannot ...
Manas Bajaj

SysML v2 and Digital Threads with Syndeia

SysML v2 is the next generation Systems Modeling Language for modeling complex systems that significantly enhances precision, expressiveness, usability, interoperability, and ...
Manas Bajaj

Digital Thread Conference 2024: A Milestone for Digital Engineering

AI for DT & DE | Part 1 – Connecting with OpenAI as a service in Syndeia®

Introduction – AI for Digital Threads and Integrated Digital Engineering Welcome to our new blog series – Artificial Intelligence (AI) for Digital Threads and Integrated Digital ...
Manas Bajaj