Rest Scripted API help

SnowDevOps
Giga Guru

Hello Team

I'm trying to follow a turorial how to do this Rest Scripted API. I created the custom action to test the connection. Everything looks great. I got message "200"; I saved the action and published it. Then we filled out the Data Source new record. In the request action, for some reason the action is not shown in request action field. I'm not sure why. It tried to logout & log back in. Still not shown. Just just not shown. I'm not sure what to do. I'm using the pdi, i don't know if that is the reason. I'm kinda stuck, i don't know if i'm missing something or not. Thanks for your help. 

Here is my Action

SnowDevOps_1-1728934851950.png

 

Screenshot for test connection

SnowDevOps_0-1728934806336.png

The action is not shown in Request Action field

SnowDevOps_2-1728934912795.png

 

Here is the link of tutorial:
https://youtu.be/m52m_XuqYwE?si=FRgKxJlg0qUOl6H6&t=369

part 6:09

 

 

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

Hi @SnowDevOps  Probably you are missing "Action Template" value "DATASOURCE_REQUEST" , that's the reason its not showing in the list. 

If you will create request action from data source it will auto populate DATASOURCE_REQUEST in action template field.

You have two solution here, either go to the table sys_hub_action_type_definition and search your action then set action template field value as DATASOURCE_REQUEST then it will be appear in the list.

Other solution is to create rest action directly from data source, you will see filter icon , just click on it and create your action, then it will appear .

 

Let me know if you have any further questions for me.

 

Thanks,

Harsh

 

View solution in original post

3 REPLIES 3

Harsh Vardhan
Giga Patron

Hi @SnowDevOps  Probably you are missing "Action Template" value "DATASOURCE_REQUEST" , that's the reason its not showing in the list. 

If you will create request action from data source it will auto populate DATASOURCE_REQUEST in action template field.

You have two solution here, either go to the table sys_hub_action_type_definition and search your action then set action template field value as DATASOURCE_REQUEST then it will be appear in the list.

Other solution is to create rest action directly from data source, you will see filter icon , just click on it and create your action, then it will appear .

 

Let me know if you have any further questions for me.

 

Thanks,

Harsh

 

OMG, you are so awesome! It works. It seems to be a simple solution but it could cause a lot of headaches if you don't know. It would prevent you from continuing to learn from this tutorial. 

Hello,

after I went through that. I clicked on Test loads on 20 records. Then i got this error

Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null

I'm not sure why it's null ?

SnowDevOps_0-1728965237502.png