-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APICategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)Currently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active work
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
When creating a new content type via REST we do a post to the collection with a set of data. These parameters are defined by the SPContentTypeEntityData in the source code, however this type cannot be resolved (see observed behavior). It is expected that we could call the method with the defined type using all the properties.
Ideally we could create a new content type and specify the entire new content type id, but that is a bigger change.
Observed Behavior
If you make the POST request with a plain object with a metadata type of "SP.ContentTypeEntityData", "SPContentTypeEntityData", or "ContentTypeEntityData" you get an error below:
{"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"A type named 'ContentTypeEntityData' could not be resolved by the model. When a model is available, each type name must resolve to a valid type."}}}
Steps to Reproduce
Craft a POST request to the rest API and try to specify ParentContentTypeId in that data.
stijnbrouwers, NielsHamelryck and johannes-z
Metadata
Metadata
Assignees
Labels
area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APICategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)Currently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active work