Passing parameters into RPC calls for interface schemas

Hey everyone,

We have a custom app where users can select from a list of APIs to execute. Each API has a different output schema.
I want to provide the schema dynamically (so it’s available without first triggering the API), but I’m struggling to access mappable parameters in the RPC call.

For the GetAPI RPC call, I can access the (nested) parameters, but for the GetAPISchema RPC call I can’t.
Is there a way to access the api_name parameter in the GetAPISchema RPC call as well?

Setup

RPC - GetAPI:

{
	"url": "/api/{{parameters.api_name}}",
	"method": "GET",
	"qs": {},
	"body": {},
	"headers": {},
	"response": {
		"iterate": "{{body.parameters}}",
		"output": {
            "name": "{{item.name}}",
            "label": "{{item.description}}",
            "type": "text",
			"default": "{{item.default}}"
		}
	}
}

RPC - GetAPISchema:

{
	"url": "/api/{{parameters.api_name}}/make_schema",
	"method": "GET",
	"qs": {},
	"body": {},
	"headers": {},
	"response": {
        "output": "{{body}}"
	}
}

Action - Mappable Parameters:

[
	{
		"name": "api_name",
		"type": "select",
		"label": "API Name",
		"options": "rpc://GetAPIs",
		"required": true,
		"nested": "rpc://GetAPI"
	}
]

Action - Interface:

[
	"rpc://GetAPISchema" # HOW TO ACCESS THE api_name PARAMETER HERE?
]

Welcome to the Make community!

Did you mean to do something like this?

"rpc://GetAPISchema?api_name=myApiName"

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Hey, thanks for your response!
Yes, exactly — but the value needs to be set dynamically, based on the user’s selection for the mappable parameter api_name.
Is that possible?
?api_name=myApiName seems hard-coded

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.