Forums

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

Create Schema via api set "Allow others to select objects from this schema" to yes

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 22, 2023

Hi there,

I have a little powershell script which is creating some schema that I need, but I want to be able to have the "Allow others to select objects from this schema" check box in the General Configuration to be set to true where as the default it is unchecked.

I can't see in the API where I can set this?

Does anyone know how I can set this to on automatically every time a schema is created or what the attribute is to set to true when creating via the API?

thanks

1 answer

1 accepted

1 vote
Answer accepted
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 22, 2023

Figured it out

 

Function UpdateSchemaGlobal () {
$body = @"

{
`"allowOtherObjectSchema`": true
}

"@

$response = Invoke-RestMethod "https://api.atlassian.com/jsm/assets/workspace/$workspaceId/v1/global/config/objectschema/$SchemaId/property" -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events