[API] post_resource__resourceId__roles issue: Organization not found #1004

Closed
opened 2026-04-05 18:07:19 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Esa-mimbias on 8/27/2025

Hi,

Still using API extensively to configure Pangolin "as code".

I met another issue when trying to set a role to a resource

in my example, my resource is number 57 (

{"resourceId":57,"name":"aaaa","ssl":true,"fullDomain":"aaaa.subdomain.domain.tld.diplomatie.fr","passwordId":null,"sso":true,"pincodeId":null,"whitelist":false,"http":true,"protocol":"tcp","proxyPort":null,"enabled":true,"domainId":"domain1"}

I try to add member role (default role, number 2) for my ord named prod

{"roleId":2,"orgId":"prod","isAdmin":null,"name":"Member","description":"Members can only view resources","orgName":"prod"}

POSTing using curl fails:

 {"data":null,"success":false,"error":true,"message":"Organization not found","status":500,"stack":null}

docs swagger execute fails consistantly:

Image

in Pangolin debug logs,

POST /api/v1/resource/41/roles

seems OK (and indeed, it works)

I tried to check code around 6c9b445be6/server/routers/resource/setResourceRoles.ts (L75) but I'm not proficient enough in TS :(

It would really help me.

*Originally created by @Esa-mimbias on 8/27/2025* Hi, Still using API extensively to configure Pangolin "as code". I met another issue when trying to set a role to a resource in my example, my resource is number 57 ( ``` {"resourceId":57,"name":"aaaa","ssl":true,"fullDomain":"aaaa.subdomain.domain.tld.diplomatie.fr","passwordId":null,"sso":true,"pincodeId":null,"whitelist":false,"http":true,"protocol":"tcp","proxyPort":null,"enabled":true,"domainId":"domain1"} ``` I try to add `member` role (default role, number 2) for my ord named `prod` ``` {"roleId":2,"orgId":"prod","isAdmin":null,"name":"Member","description":"Members can only view resources","orgName":"prod"} ``` POSTing using curl fails: ``` {"data":null,"success":false,"error":true,"message":"Organization not found","status":500,"stack":null} ``` `docs` swagger execute fails consistantly: <img width="1172" height="1651" alt="Image" src="https://github.com/user-attachments/assets/74b28707-e4c8-4860-9cf7-d1795f909f4e" /> in Pangolin debug logs, ``` POST /api/v1/resource/41/roles ``` seems OK (and indeed, it works) I tried to check code around https://github.com/fosrl/pangolin/blob/6c9b445be60139901f3b1f8bd2afed74e6a15020/server/routers/resource/setResourceRoles.ts#L75 but I'm not proficient enough in TS :( It would really help me.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1004