Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Schema and Object types via a script in Assets

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2023

Hi there,

I have some powershell scripts that create objects in various object types I have manually created in Assets.

Does anyone know if it is possible to create the schema and objecttypes and attributes via a script also?

Not sure if that is possible but curious if anyone has achieved this (ideally with powershell)

Thanks.

1 answer

1 vote
Kai Becker
Community Champion
June 19, 2023

Hi @Ste404 

I'm not familiar with powershell, but according to the documentation, it is possible to create objectTypes via API. https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-create-post

It is also possible to create new schemas via API: https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-create-post

Hopefully these will help you get started, but as you've already have the setup for objects, the difference shouldn't be to hard.

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2023

Hey,

Yeh I was having a look at that and it does what I need it to but you have to manually feed information back into it.

What I was trying to achieve is a way to create the schema, then pass that to the create objecttype command and then when creating attributes pass the objecttype if possible.

I think I may be way off on a tangent with what I am trying to achieve here, just attempting to automate the whole process basically.. but the getting back info part is eluding me.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events