cancel
Showing results for 
Search instead for 
Did you mean: 

Paxata project creation with available dataset through a Java Program

Paxata project creation with available dataset through a Java Program

Hi,
Can someone please let me know if it is possible to create a project in paxata which will pull the existing dataset information in it through a Java code.
Currently, I was able to create a blank project in paxata using java code. But my requirement is, while project creation it should also pull the existing dataset information in it.

Regards,
Abhijeet
Labels (1)
19 Replies

Hello Abhijeet, you can create a project in paxata which will use a dataset through a Java code. This is possible by leveraging our REST API Capabilities. Try using our GET feature to retrieve the JSON of the project and then you can loop through the JSON file to update the dataset ID (PUT). Please do let me know if this works for you.

Thank You and Best Regards,
Akshay

Hi Akshay,
Thanks for the answer. Does this mean we have to create a blank project first and then update the same project with already existing dataset?

Regards,
Abhijeet

Yes create an empty project, retrieve the JSON of that project and the modify the dataset ID. I hope this helps.

Regards,
Akshay

Thanks Akshay. I was able to retrieve single or all project details as json output. But here the drawback is, to retrieve single project details, I had to pass the projectId field. Can we return single project details using project name instead of projectId. If yes then will be thankful if you can share the format for the GET request with project name.
Melanie
Linear Actuator

Hi Abhijeet,
we do allow, within the same tenant, identical Project names. Please see below the GET request format and options. The optional "name" argument can be used to return the metadata for all Projects that share the same name. 
Hope this helps.

HTTP GET

URL format: /projects[/projectId][?name=name][&description=description][&userId=userId]

Returns the project metadata for all projects visible to the authenticated user. If the URL contains the optional projectId argument, then the API returns only the metadata for that project.


Hi Melanie,
I do not want to pass projectId field at all (which is required field as per the screenshot you shared).

Can I pass only project name and skip projectId all-together and retrieve the project JSON.


Hi Akshay/Melanie,
I retrieved project JSON as below.

Project Json {"tenantName":"Development","created":"2019-10-31 09:08:42 EDT","permittedActions":["CreateVersion","Share","Know","Publish","Delete","Read","Update"],"tenantId":"1234567","name":"Project25","description":"Created through the REST API","userName":"TestUser","projectId":"abcdefgh","userId":"f99a9471cf374fcbb493053f5ff380e2","updated":"2019-10-31 09:08:42 EDT"}

It does not contain datasetId field and value.
So I added a key value pair for datasetId and modified JSON is as below

Project Json modified {"tenantName":"Development","created":"2019-10-31 09:08:42 EDT","permittedActions":["CreateVersion","Share","Know","Publish","Delete","Read","Update"],"tenantId":"1234567","name":"Project25","description":"Created through the REST API","datasetId":"52b861ea954c48de861e652779885a50","userName":"TestUser","projectId":"abcdefgh","userId":"f99a9471cf374fcbb493053f5ff380e2","updated":"2019-10-31 09:08:42 EDT"} 

Please let me know if this is the correct process and how shall, I execute a PUT call for project with JSON object as input parameter.


Regards,
Abhijeet
Melanie
Linear Actuator

Hi again Abhijeet, 
first off my apologies as I mis-spoke about allowing i
dentical Project names within the same tenant That is not accurate. We allow identical dataset names within the same tenant.
However, the GET method I provided above is accurate.

Regarding your most recent question, yes, you can 
write a helper function to do that using our API. If you need assistance creating the help function, please contact the Paxata Customer Success team for help. 
Hope this helps!

Hi Melanie,
Thanks for your reply.
1) GET method syntax you provided is working for us but when I remove projectId and specify only project name it does not work.
e.g. as below. Project25 is the name of the project.
String url = "https://paxata-dev-vip.nam.nsroot.net:8089/rest/projects?Project25

I am expecting a syntax (if available) which will give me project metadata by passing project name only.

2) I will contact Paxata Customer Success team for helper function.
Please provide us the email id of the same team.

Regards,
Abhijeet
Melanie
Linear Actuator

HI there, you can reach our CS group through this email: servicedesk@paxata.com
And they can assist you with both of the questions you have above. 
cheers, Melanie