Action submission

Hi,

I am trying to have users I create externally through Auth0 submit an action via their token. In particular I want to use the API call:

const palantirResponse = await fetch(`${palantirConfig.baseUrl}${palantirConfig.endpoints.documents}`, {
                method: 'POST',
                headers: {
                    'Authorization': `Bearer ${token}`,
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify({
                    parameters: {
                        user_uid: 'test-user',
                        company_uid: 'test-company',
                        document_name: req.file.originalname,
                        document_text: pdfData.text
                    },
                    options: {
                        returnEdits: "ALL"
                    }
                })
            });

where:

endpoints.documents is: /api/v2/ontologies/[ontology_id]/actions/create-v2document/apply
baseUrl is my Palantir URL

This works when I am logged in through my Palantir super-admin account but when I log in via another user that has the capability to submit an action I get that the action or ontology is “Not Found”. This is despite the fact that the user is part of a group which is in the submission criteria for the action.

I assume this has something to do with being able to view ontologies and objects but I am unsure how to enable viewing the ontology without allowing that user to then have access to the ontology which I don’t want :slight_smile:

Hello!

For a user to be able to submit an Action, they must be able to see the Action Type itself, and any resources that the Action uses. This could include functions, Object Types, Webhooks, etc.

They do not need to be able to see the whole Ontology, just the resources that are related to that Action.

In the case of Object Types, the user will need permission to view the datasets that back the object type.

More details on the required permissions to apply an action can be found here - https://www.palantir.com/docs/foundry/action-types/permissions

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