The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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

}

TAGS
AUG Leaders

Atlassian Community Events