Web app
1. Navigate to https://www.swytchcode.com/
2. Click “Console Login”
3. Click the “Email” field.
4. Click “Organizations”
5. To add a new API , [[Click on Organizations.]]
6. Add the details of the company here.
Click the “Name” field and add the name of the API provider.
7. Click the “Website” field and enter the URL of the company website.
8. Click “Create”
Success message : the organization has been added.
9. To add the OpenAPI specification of Postman collection.
[[Click Services, the right side of the console will show all the available APIs in tabular format.]]
10. Click “Add Service” to add the new API specification,
11. Add the details.
Click the “Name” field and add the name of the API provider.
Type Name of the service, for example in this case “Yapily”
12. [[Add name of the group, no space or special characters.]]
Select the Specification type, OpenAPI specification or Postman collection.
13. Click “OpenAPI”
14. [[Add the version name - No Spaces or characters.]]
Click the “Service Version” field and add the Version of the API.
15. Click the “Select Organization” field and Select the company for which you are adding the API. You can type the name in the search box for faster selection.
16. Select the Organization
17. Select type of service - API, SDK support is WIP.
18. Click the “Documentation Website” field and add the URL of API documentation. This is to record and organize API related information and making it more accessible in future updates.
19. Swytchcode supports OpenAPI specification V2, V3 and V3.1 and Postman collection. You have two options so add the specification.
1.You can submit the URL of OpenAPI specification or Postman collection in Json or Yaml/Yml format.
- Upload the file - You can upload from your local system either the OpenAPI specification or postman collection in Json or Yaml/Yml format.
- Important conditions - There should be no space, ”_” or special character in the filename.
20. In this example, I uploaded the OpenAPI specification file in Json format. Click Create to add the specification.
Success message - The library has been added you will be notified by email when it is ready.
Note : It takes 40 seconds to 200 seconds for our system to Standardize and make it code generation ready, this depends upon the size of the API specification.
21. To Generate code for APIs , [[Click on code in the left nav bar.]]
22. Click “Methods”
23. 1. [[Select methods]]
-
[[A dropdown menu appears on the right side.]]
-
[[Select your choice of language from the drop down menu]]
24. For example, I choose Typescript.
25. 1. [[Select the Organization]]
- Look up the Company name under organizations
26. 1. [[Select the Organization]]
- In this example, I choose Yapily.
27. 1. [[Select the Service]]
28. 1. [[Select the version]]
29. 1. [[The right side of the panel will show all the available methods for this API.]]
- Click on Generate to get the ready to use sample code.
30. Code generation for API methods. This is how the success response looks like.
31. Once the code is generated, you can submit your custom prompt to add or update the generated code.
You can click on Publish to share it with the community.
32. Click “Close” to close the window and to go back to the listing of API methods.
33. 1. [[Click on Code in Console]] 2. [[Select Workflow,]]
34. Searching for existing workflows
35. Select the programming language of your choice.
36. Select the Organization
37. Click the “Select Service” field and Select the API.
38. Click the “Select Version” field and select the version of your choice.
39. Result : In this example of Yapily, there are no existing workflows.
In case
40. To add a new workflow [[Click on add workflow]]
41. [[Select your choice of language from the drop down menu]]
42. 1. [[Select the Organization]]
43. For example select “plaid”
44. Click on “Select Service and select the API.
45. Select the Version
46. Click and Give name to the workflow and click on “Next”
47. Click the “Ask SwytchCode to generate workflow for…” field.
[[Enter a prompt for your workflow in the chat window, it can be a sequence of API calls, calling different methods or just simply how a workflow has been designed.]]
Click “Enter” of the Arrow button for chat to submit your prompt.
48. Success : The sample code is generated for workflow.
49. [[Once the code is generated, you can enter a prompt to add more information like, adding function for authorization, frameworks like next.js or add inline comments for more details about the generated code.]]
50. Generate Code for existing services.
[[Click on code in the left nav bar.]]
[[Select methods]]
-
[[A dropdown menu appears on the right side.]]
-
[[Select your choice of language from the drop down menu]]
51. Select your Programming language of choice, e.g Click “golang”
52. Select the Organization, the API for which you want to generate the code.
for example Click “solana”
53. [[Select the Service]]
Select the API, for e.g Click “solana”
54. [[Select the version]]
select the version , for e.g Click “v1”
55. [[The right side of the panel will show all the available methods for this API.]]
Click “Generate” to generate sample code in choice of your programming language.
56. [[You can enter a prompt to add more details to the generated code.]]
You can add your prompt in the chat window.