Operation Summary:
Modifies the attributes associated with a blog.
Resource URL:
https://api.compendiumblog.com/app/blog/edit
HTTP Status Code Details:
- 200 OK
- The blog's attributes were edited successfully.
- 403 Forbidden
- You do not have the permissions required to operate on this resource.
Response Representations:
Required Parameters:
- BlogId
- The system assigned unique identifier of the blog to be edited. This parameter is optional for a
'Default Permissions' user, and if such a user supplies a BlogId, it must be the Id of their own user blog. When a 'Default Permissions' user omits the BlogId, the edit operation will be applied to their user blog.
- Attributes
- The attributes of the blog to be updated, expressed as a JSON object. Attributes are listed and documented later on in this section. At least one attribute must appear in this object.
The structure of the Attributes parameter is an object representing the new attributes as key/value pairs. The possible keys are:
- Title
- The blog's title, expressed as a string.
- Description
- The blog's description, expressed as a string.
- CategoryId
- The system-assigned unique identifier of the a network category to be associated with the blog, expressed as a string. Must be a valid category identifier for the network to which the blog belongs. This value changes very rarely.
- Tags
- Tag strings to be used for compending content to this blog, expressed as a flat array of strings. May be specified only for keyword blogs.
Optional Parameters:
There are no optional parameters for this endpoint.
Response Values:
- Success
- The blog's attributes were modified successfully.
- Error
- The blog's attributes were not modified.
Response Structure:
A successful call will result in a JSON object listing both the old and new attributes for the blog. It has the following structure:
{
Success:
{
Prev:
{
Title: string,
Description: string,
CategoryId: string,
Tags: [string, string, ... ]
},
Current:
{
Title: string,
Description: string,
CategoryId: string,
Tags: [string, string, ... ]
}
}
}
Error Types:
- BlogId
- BlogId must be valid.
- Attributes
- Attributes must not be empty and must contain a valid key.
- Attributes_CategoryId
- Attributes_CategoryId must be a valid UUID
- Attributes_Title
- Attributes_Title must be between 1 and 50 characters
- Attributes_Tags
- Invalid Tags array specified
- Attributes_Description
- Attributes_Description must be between 1 and 256 characters.
- Edit
- Unable to save edit
Additional Notes:
- The
'Super Administrator' role may modify the attributes of any blog.
- The
'Super Delegate' role may modify the attributes of any blog that belongs to an assigned network.
- The
'Network Administrator' role may modify the attributes of any individual blog that resides on his or her own network. The 'Network Administrator' may only modify the 'Title' and 'Description' attributes of compended blogs on the respective network.
- There are additional side effects when this endpoint is invoked for a individual blog that has not been set up with a title. The edit operation generates the component of the blog's URL based on the title supplied, and this value remains fixed over the lifetime of the blog for SEO purposes. Additionally, if the user's network allows API key access, a remote key will be created for the user's account. The remote key can then be retrieved with the Get operation on the User resource. When the user first logs into the application, the initial blog setup page will be bypassed.
Command Line Example
This example changes the title and description of a blog.
curl --insecure \
-H "Accept: application/vnd.compendium.blog;version=2,application/json" \
--user someUser:someKey \
-d 'BlogId=9f9c83d1-427a-4adf-8c5a-e3efa969ff6e' \
-d 'Attributes={"Title" : "Metabloggery", "Description" : "Blogging about Blogging"}' \
https://api.test.compendiumblog.com/app/blog/edit