palantir / palantir/foundry-platform-python

Create objectType

Open
#169 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
206
Forks
50
Avg merge
6d 3h
Merged PRs (30d)
3

Description

I can get a new object type via the REST API... but I can't create one.

Which means if I have a collection of object types to create at the start of an engagement, I'm going to have to manually add them. Obviously via REST I wouldn't expect to have the full flexibility of the manual wizard, but I would expect to be able to CRUD the basics at least

I would expect the potential request payload to be similar to the Get objectType with the exception of the RID's of all the elements.

Expected Payload

{
  "apiName": "employee",
  "description": "A full-time or part-time employee of our firm",
  "displayName": "Employee",
  "status": "ACTIVE",
  "primaryKey": "employeeId",
  "properties": {
    "employeeId": {
      "dataType": {
        "type": "integer"
      },
    },
    "fullName": {
      "dataType": {
        "type": "string"
      },
    },
    "office": {
      "description": "The unique ID of the employee's primary assigned office",
      "dataType": {
        "type": "string"
      },
    },
    "startDate": {
      "description": "The date the employee was hired (most recently, if they were re-hired)",
      "dataType": {
        "type": "date"
      },
    }
  },
}

As an example use case, this would allow me to populate an Ontology with a 1:1 mapping of a pre-existing model: by listing the current ontology objects and then creating the missing ones.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked Get objectType API documentation and the repository's existing objectType REST operations. Define the create operation and its request payload based on the issue's example, then verify that missing object types can be created for the described ontology-population workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.