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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Getting all style definitions on my server

Janicen
15-Moonstone

Getting all style definitions on my server

Good day community,

 

I want to get all the style definitions on my server. Then assign permissions to these dynamically using a service. I know how to assign permissions dynamically however, I am unsure about how to get all the style definitions that are on my server. 

I saw the spotlights search on searchFunctions it could be helpful.

Has anyone tried something like this before?

 

Best Regards,

Janice

ACCEPTED SOLUTION

Accepted Solutions
nmutter
14-Alexandrite
(To:Janicen)

On Entity EntityServices there is a service GetEntityList which you can pass in a entity type of 'StyleDefinition' which returns all Styles

nmutter_1-1726046895608.png

Is this what you are searching?

 

View solution in original post

4 REPLIES 4
nmutter
14-Alexandrite
(To:Janicen)

On Entity EntityServices there is a service GetEntityList which you can pass in a entity type of 'StyleDefinition' which returns all Styles

nmutter_1-1726046895608.png

Is this what you are searching?

 

Janicen
15-Moonstone
(To:nmutter)

yes, this is what I was looking for.

Thank you @nmutter.

 

Janicen
15-Moonstone
(To:nmutter)

I am trying to do the same for media entities

 

let styles = Resources["EntityServices"].GetEntityList({
maxItems: 10000 /* NUMBER {"defaultValue":500} */,
nameMask: undefined /* STRING */,
type: "media" /* STRING */,
tags: undefined /* TAGS */
});

 

But I keep getting this strange error: : Invalid Entity Type [media]

I have tried: Media, media, MediaEntities, mediaEntities and still get the same error.

 

I am unsure of how to specify the type.

 

Janicen
15-Moonstone
(To:Janicen)

Using the developer options, I found the payload of a spotlightSearch service and turns out that the type is: MediaEntity.

Thank you.

Announcements


Top Tags