pperrone
Charter Member

Access API Parameters

Jump to solution

I have seen the documentation for the Access API -- both the web pages at http://developer.crownpeak.com/Documentation/AccessAPI/index.html and Swagger. Unfortunately, there are times where I am left guessing the meaning of a particular parameter and/or what are acceptable values for a parameter. For example, the /accessapi/asset/create method has many parameters whose datatype is an integer. The range of acceptable values and specific meaning of those values isn't documented.

Is there some other resource I should look at?

1 Solution

Accepted Solutions
MarinK
Crownpeak (Retired)

Hi pperrone,

Thank you for your question! We are so excited to see this kind of participation during the soft launch.

To get an answer for you I turned to our Product and Services teams. I learned that work is being done to consolidate our reference documents to create the type of resource you are looking for.

Since that is ongoing, I will look to put you in touch with an SME who can answer the parameter questions that you cannot find an answer to you.

View solution in original post

0 Kudos
4 Replies
MarinK
Crownpeak (Retired)

Hi pperrone,

Thank you for your question! We are so excited to see this kind of participation during the soft launch.

To get an answer for you I turned to our Product and Services teams. I learned that work is being done to consolidate our reference documents to create the type of resource you are looking for.

Since that is ongoing, I will look to put you in touch with an SME who can answer the parameter questions that you cannot find an answer to you.

0 Kudos
FerdinandLugo
Crownpeak (Retired)

The parameters for the AssetCreateRequest ("/accessapi/asset/create") are as follows:

  • destinationFolderId - The Id of the folder where the asset will get created
  • devTemplateLanguage
  • modelId - The Id of the model that the asset is to be based off of
    • modelId is mandatory when creating a templated asset
  • newName - The name of the asset
  • subtype - The subtype of asset being created
    • DeveloperTemplate = 1
    • Collection = 8
    • TemplateFile = 16
    • Project = 32
    • Library = 64
    • SiteRoot = 128
    • TemplateFolder = 256
    • Template = 512 // this is a folder that holds template files.
    • Workflow = 1024
    • State = 2048
  • templateId - the Id of the template that the asset will be based off of
    • templateId can be empty when providing the model Id for creating a templated asset
  • type - The type of asset being created
    • Unspecified = 0
    • File = 2
    • Folder = 4
    • Mount = 9
    • Connector = 10
  • workflowId - the id of the workflow to be assigned to the asset

 

 

This is great information! I look forward to seeing similar detail for all methods. 🙂

0 Kudos

As an aside, the V3 interface uses the Access API so anything you can do in V3, you can do through the Access API. Knowing this, you can do a little investigation into the API parameter values by using an intercepting proxy, Charles is a popular choice but I prefer MITMProxy, between the browser and the CMS backend.

This method won't tell you what the range of accepted values is for each parameter, but it is a good fallback while the Access API documentation is brought up to speed.