Please use version 1.0 of the API to retrieve tokens.
- BlogPost
- Fields
- Create: POST /2.0/BlogPost
- Update: PUT /2.0/BlogPost
- Delete: DELETE /2.0/BlogPost
- Get: GET /2.0/BlogPost
- Query: GET /2.0/BlogPost/recent
- Query: GET /2.0/BlogPost/featured
- Query: GET /2.0/BlogPost/count
- Discussion
- Fields
- Create: POST /2.0/Discussion
- Update: PUT /2.0/Discussion
- Delete: DELETE /2.0/Discussion
- Get: GET /2.0/Discussion
- Query: GET /2.0/Discussion/recent
- Query: GET /2.0/Discussion/featured
- Query: GET /2.0/Discussion/count
- Photo
- Fields
- Create: POST /2.0/Photo
- Update: PUT /2.0/Photo
- Delete: DELETE /2.0/Photo
- Get: GET /2.0/Photo
- Query: GET /2.0/Photo/recent
- Query: GET /2.0/Photo/featured
- Query: GET /2.0/Photo/count
- Bundle
- User
- Fields
- Create: POST /2.0/User
- Update: PUT /2.0/User
- Get: GET /2.0/User
- Query: GET /2.0/User/recent
- Query: GET /2.0/User/featured
- Query: GET /2.0/User/pending
- Member Category
- Comment
- Fields
- Create: POST /2.0/Comment
- Update: PUT /2.0/Comment
- Delete: DELETE /2.0/Comment
- Get: GET /2.0/Comment
- Query: GET /2.0/Comment/recent
- Query: GET /2.0/Comment/featured
- Network
- SitePage
- Bulk
- Group
- Fields
- Create: POST /2.0/Group
- Update: PUT /2.0/Group
- Delete: DELETE /2.0/Group
- Get: GET /2.0/Group
- Query: GET /2.0/Group/recent
- Query: GET /2.0/Group/featured
- Query: GET /2.0/Group/count
- Message
- Fields
- Create: POST /2.0/Message
- Update: PUT /2.0/Message
- Query: GET /2.0/Message/inbox
- Query: GET /2.0/Message/sent
- Query: GET /2.0/Message/archive
- Undocumented
BlogPost
Manage blog posts on your Ning network.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
title | string | Plain-text title of the entry. |
description | string | The body of the entry; scrubbed HTML. |
url | url | URL to appropriate detail page for the object |
excerpt | string | Excerpt of the description, unscrubbed from user input |
imageUrl | string | The URL of the photo. |
bundleId | string | Content ID of the associated Bundle object. |
publishTime | date | Time before which the entry won’t appear, or null if the entry hasn’t been published yet. |
publishStatus | string(draft, queued, publish) | The state of the entry: draft, queued for publishing in the future, and published |
featureTime | date | Time at which the entry was featured, or null if not featured. Must not be earlier than the publishTime. |
slug | string | Content slug for SEO URLs |
tagNames | string | JSON array of tag names for this entry. The tag names are cached on the Entry object to reduce querying on the listing page. |
approved | boolean | Indicates whether this content is approved or not. This is only set to false if moderation is turned on for this bundle |
imageId | string | The ID of the PhotoAttachment content object storing the image data. |
imageWidth | number | The width of the photo, in pixels. |
imageHeight | number | The height of the photo, in pixels. |
imageRotation | number | The rotation of the photos in degrees. |
categoryNames | array(string) | Categories that this object is in |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/BlogPost
Create a new BlogPost.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
ID of the Bundle content object this blog post will belong to |
title | string | ![]() |
Title of the blog post |
description | string | ![]() |
Body of the blog post |
excerpt | string | Excerpt of the blog post that appears in various summary and list views | |
slug | string | Slug for the blog post (for its URL) | |
tagNames | string | Comma-delimited list of tags for the blog post | |
categoryNames | string | Comma-delimited list of categories for the blog post. Each category must be a valid category for the specified bundle. | |
publishTime | date | “now” | Timestamp to set publish time to, or “now” to set publish time to current time. | |
publishStatus | string | “draft” to save the blog post as a draft | |
image | binary image data | Image to attach to the blog post | |
imageWidth | integer | Image width to use for the provided image. If not specified, image’s actual width is used. | |
imageHeight | integer | Image height to use for the provided image. If not specified, image’s actual height is used. | |
imageRotation | integer | Image rotation (degrees) for the provided image. |
If an image is included, the request should be made as a MIME multipart message. Otherwise the request should be a standard form-encoded POST.
Update: PUT /2.0/BlogPost
Update an existing BlogPost. When editing a blog post, imageWidth, imageHeight, and imageRotation can be included without including a new image. In that case, they will adjust the height, width, and rotation settings for the existing image.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the blog post object to update |
title | string | ![]() |
Title of the blog post |
description | string | ![]() |
Body of the blog post |
excerpt | string | Excerpt of the blog post that appears in various summary and list views | |
slug | string | Slug for the blog post (for its URL) | |
tagNames | string | Comma-delimited list of tags for the blog post | |
categoryNames | string | Comma-delimited list of categories for the blog post. Each category must be a valid category for the specified bundle. | |
publishTime | date | “now” | Timestamp to set publish time to, or “now” to set publish time to current time. | |
publishStatus | string | “draft” to save the blog post as a draft | |
image | binary image data | Image to attach to the blog post | |
imageWidth | integer | Image width to use for the provided image. If not specified, image’s actual width is used. | |
imageHeight | integer | Image height to use for the provided image. If not specified, image’s actual height is used. | |
imageRotation | integer | Image rotation (degrees) for the provided image. |
If an image is included, the request should be made as a MIME multipart message. Otherwise the request should be a standard form-encoded POST.
Delete: DELETE /2.0/BlogPost
Deletes the BlogPost with the provided ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
The ID of the BlogPost to delete |
Get: GET /2.0/BlogPost
Retrieve one or more BlogPost objects by ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the BlogPost object to retrieve. Can be specified more than once. |
Query: GET /2.0/BlogPost/recent
Finds BlogPost objects ordered by most-recently-created first. You must either supply an author or a valid bundleId. You can supply both if you want only items in a particular bundle by a particular author. If you are supplying author and want all items by that author regardless of bundle, you must supply none as the value for bundleId. You can not just omit bundleId.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
Find objects in this bundle. Must be set to none if author is set and you want to retrieve all objects by the given author regardless of bundle |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/BlogPost/featured
Finds BlogPost objects ordered by most-recently-featured first. You must either supply an author or a valid bundleId. You can supply both if you want only items in a particular bundle by a particular author. If you are supplying author and want all items by that author regardless of bundle, you must supply none as the value for bundleId. You can not just omit bundleId.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
Find objects in this bundle. Must be set to none if author is set and you want to retrieve all objects by the given author regardless of bundle |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/BlogPost/count
Find the number of BlogPost objects created after the given date.
Field | Type | Required? | Description |
---|---|---|---|
createdAfter | date | ![]() |
The date to start counting after. If the date is more than a week old, an error is returned. |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Discussion
A discussion.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
title | string | Plain-text title of the entry. |
description | string | The body of the entry; scrubbed HTML. |
url | url | URL to appropriate detail page for the object |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/Discussion
Create a Discussion.
Field | Type | Required? | Description |
---|---|---|---|
BundleId | ID | ![]() |
ID of the Bundle content object this discussion will belong to. |
title | string | ![]() |
Title of the discussion |
description | string | ![]() |
Body of the discussion |
slug | string | Slug for the discussion (last part of its URL) | |
tagNames | string | Comma-delimited list of tags for the discussion | |
categoryNames | string | Comma-delimited list of categories for the discussion |
Update: PUT /2.0/Discussion
Update a Discussion.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the discussion object to update |
title | string | Title of the discussion | |
description | string | Body of the discussion | |
slug | string | Slug for the discussion (last part of its URL) | |
tagNames | string | Comma-delimited list of tags for the discussion | |
categoryNames | string | Comma-delimited list of categories for the discussion |
Delete: DELETE /2.0/Discussion
Deletes the Discussion with the provided ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
The ID of the Discussion to delete |
Get: GET /2.0/Discussion
Retrieve one or more Discussion objects by ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Discussion object to retrieve. Can be specified more than once. |
Query: GET /2.0/Discussion/recent
Finds Discussion objects ordered by most-recently-created first. You must either supply an author or a valid bundleId. You can supply both if you want only items in a particular bundle by a particular author. If you are supplying author and want all items by that author regardless of bundle, you must supply none as the value for bundleId. You can not just omit bundleId.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
Find objects in this bundle. Must be set to none if author is set and you want to retrieve all objects by the given author regardless of bundle |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Discussion/featured
Finds Discussion objects ordered by most-recently-featured first. You must either supply an author or a valid bundleId. You can supply both if you want only items in a particular bundle by a particular author. If you are supplying author and want all items by that author regardless of bundle, you must supply none as the value for bundleId. You can not just omit bundleId.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
Find objects in this bundle. Must be set to none if author is set and you want to retrieve all objects by the given author regardless of bundle |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Discussion/count
Find the number of Discussion objects created after the given date.
Field | Type | Required? | Description |
---|---|---|---|
createdAfter | date | ![]() |
The date to start counting after. If the date is more than a week old, an error is returned. |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Photo
A photo.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
title | string | Plain-text title of the entry. |
description | string | The body of the entry; scrubbed HTML. |
url | url | URL to appropriate detail page for the object |
imageUrl | string | The URL of the photo. |
imageWidth | number | The width of the photo, in pixels. |
imageHeight | number | The height of the photo, in pixels. |
imageRotation | number | The rotation of the photos in degrees. |
slug | string | Content slug for SEO URLs |
tagNames | string | JSON array of tag names for this entry. The tag names are cached on the Entry object to reduce querying on the listing page. |
categoryNames | array(string) | Categories that this object is in |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/Photo
Create a Photo.
Field | Type | Required? | Description |
---|---|---|---|
BundleId | ID | ![]() |
ID of the Bundle content object this photo will belong to. |
title | string | ![]() |
Title of the photo |
description | string | ![]() |
Body of the photo |
slug | string | Slug for the photo (last part of its URL) | |
tagNames | string | Comma-delimited list of tags for the photo | |
categoryNames | string | Comma-delimited list of categories for the photo |
Update: PUT /2.0/Photo
Update a Photo.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the photo object to update |
title | string | Title of the photo | |
description | string | Body of the photo | |
slug | string | Slug for the photo (last part of its URL) | |
tagNames | string | Comma-delimited list of tags for the photo | |
categoryNames | string | Comma-delimited list of categories for the photo |
Delete: DELETE /2.0/Photo
Deletes the Photo with the provided ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
The ID of the Photo to delete |
Get: GET /2.0/Photo
Retrieve one or more Photo objects by ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Photo object to retrieve. Can be specified more than once. |
Query: GET /2.0/Photo/recent
Finds Photo objects ordered by most-recently-created first. You must either supply an author or a valid bundleId. You can supply both if you want only items in a particular bundle by a particular author. If you are supplying author and want all items by that author regardless of bundle, you must supply none as the value for bundleId. You can not just omit bundleId.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
Find objects in this bundle. Must be set to none if author is set and you want to retrieve all objects by the given author regardless of bundle |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Photo/featured
Finds Photo objects ordered by most-recently-featured first. You must either supply an author or a valid bundleId. You can supply both if you want only items in a particular bundle by a particular author. If you are supplying author and want all items by that author regardless of bundle, you must supply none as the value for bundleId. You can not just omit bundleId.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ![]() |
Find objects in this bundle. Must be set to none if author is set and you want to retrieve all objects by the given author regardless of bundle |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Photo/count
Find the number of Photo objects created after the given date.
Field | Type | Required? | Description |
---|---|---|---|
createdAfter | date | ![]() |
The date to start counting after. If the date is more than a week old, an error is returned. |
author | string | Find objects by this author. | |
approved | boolean | true to only retrieve approved objects (or objects in a bundle that does not require approval). false to only retrieve objects that currently require approval, omit to retrieve objects independent of approval status. | |
tag | string | ![]() |
Find objects with this tag. |
This request supports pagination as described at Pagination and Result Set Size
Bundle
A collection of Entry objects. For example, a blog is a Bundle of BlogEntry objects. Equivalent to a “widget instance” in the old WWF world.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
contributorTypes | array(string) | Types of users allowed to contribute to this bundle |
commentType | string(none, ning, ningFlat, ningSemiThreaded, ningThreaded, disqus, facebook) | The type of comments that appear on blog entries. |
commentOrdering | string(asc, desc) | The ordering used for native comments in this bundle, either ‘asc’ending or ‘desc’ending. |
htmlComments | boolean | Boolean indicating whether native comments allow html and should use the tiny mce editor as opposed to a standard textarea. |
customHtml | string | Optional markup that should be included at the top of all viewer facing pages, such as listing and details pages. |
instructionsHtml | string | Optional markup that should be included at the top of pages for creating and editing content. This allows the bundle creator to provide instructions that will be displayed to users when they are creating new content. |
entryContentType | string | Content type for the entries that can be stored in this bundle. |
disqusShortname | string | Shortname for Disqus comments. |
maxExcerptLength | number | The maximum length of the excerpt that users can enter. Null indicates that full posts should be displayed on the list page. |
categoryNames | array(string) | Categories available for this Bundle. |
moderateContent | boolean | Setting that indicates whether content is moderated for non admin users in this bundle |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Get: GET /2.0/Bundle
Finds the specified Bundle object.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Bundle to retrieve. To get the relevant bundleId, query /2.0/Bundle/recent |
Query: GET /2.0/Bundle/recent
Finds Bundle objects ordered by most-recently-created first. Use this to get the bundleId required by most other queries.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. | |
entryContentType | string | Content type of the bundles you would like to retrieve. Valid values are "BlogPost", "Photo", and "Discussion". |
This request supports pagination as described at Pagination and Result Set Size
User
User holds all sorts of metadata about a user of the network.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
title | string | Screenname |
description | string | Copied from system profile |
url | url | URL to appropriate detail page for the object |
featuredDate | date | For a featured user, when the user was featured. |
string | Email address. Will only be returned if the request is from an admin. | |
fullName | string | Full name, for searching |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/User
Create a new User. Only the NC may call this endpoint. Either a plaintext password or a valid authInfo parameter must be provided.
Field | Type | Required? | Description |
---|---|---|---|
string | ![]() |
Email address of the new user | |
fullName | string | ![]() |
Full name of the new user |
password | string | plaintext password for the new user | |
authInfo | string | JSON-encoded object of auth info for the new user. To supply a Ning SHA1 hashed password, authInfo should be the JSON encoded object {“type”:”sha1″,”hashed_password”: “abcd”} where abcd is the hashed password value. | |
birthdateYear | integer | 4-digit year of the new user’s birthday. To specify a birthday, birthdateYear, birthdateMonth and birthdateDay must all be provided. | |
birthdateMonth | integer | 2-digit month of the new user’s birthday. | |
birthdateDay | integer | 2-digit day of the new user’s birthday. | |
displayAge | string | whether to display age, birthday, or neither in the new user’s profile. Y for only age, B for both, N for neither | |
photo | image | profile photo for the new user | |
gender | string | gender for the new user’s profile. m for male, f for female | |
displayGender | integer | whether to display gender in the user’s profile. 0 for no, 1 for yes. Defaults to yes. | |
location | string | city name for the new user’s profile | |
zip | string | ZIP code for the new user’s profile (US only) | |
country | string | 2-letter country code for the new user’s profile | |
question_n | string | Answer to profile question #n. Can be specified more than once (with different values of n) |
If an image is included, the request should be made as a MIME multipart message. Otherwise the request should be a standard form-encoded POST.
Update: PUT /2.0/User
Update a User. Only an admin or the user being updated may call this endpoint, and only an admin may call this endpoint with the approved or blocked parameter.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the user to update |
string | Email address of the new user | ||
fullName | string | Full name of the new user | |
password | string | plaintext password for the new user | |
authInfo | string | JSON-encoded object of auth info for the new user. To supply a Ning SHA1 hashed password, authInfo should be the JSON encoded object {“type”:”sha1″,”hashed_password”: “abcd”} where abcd is the hashed password value. | |
birthdate | integer | Date of birth in the format yyyy-mm-dd | |
displayAge | string | whether to display age, birthday, or neither in the new user’s profile. Y for only age, B for both, N for neither | |
photo | image | profile photo for the new user | |
gender | string | gender for the new user’s profile. m for male, f for female | |
displayGender | integer | whether to display gender in the user’s profile. 0 for no, 1 for yes. Defaults to yes. | |
location | string | city name for the new user’s profile | |
zip | string | ZIP code for the new user’s profile (US only) | |
country | string | 2-letter country code for the new user’s profile | |
question_n | string | Answer to profile question #n. Can be specified more than once (with different values of n) | |
approved | boolean | 1 to approve the user (cannot un-approve) | |
blocked | boolean | 1 to block the user, 0 to unblock | |
reason | string | Reason for blocking the user | |
spam | boolean | 1 to indicate the user was blocked for spamming |
If an image is included, the request should be made as a MIME multipart message. Otherwise the request should be a standard form-encoded PUT.
Get: GET /2.0/User
Retrieve one or more User objects by ID and/or author. At least one author parameter or id parameter must be provided.
Field | Type | Required? | Description |
---|---|---|---|
author | string | Screen name of the User to retrieve. Can be specified more than once. | |
id | ID | ID of the User object to retrieve. Can be specified more than once. |
Query: GET /2.0/User/recent
Finds users, sorted by date created.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. | |
categoryId | ID | ID of member category, for limiting results to that category. Get this by calling GET /2.0/MemberCategory/recent. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/User/featured
Finds featured users, sorted by date featured.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/User/pending
Finds pending users, sorted by date user signed up.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Member Category
Member category holds the details of a member category, to which users/members can be added.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
title | string | Category name |
author | string | screenName of the creator of this object |
slug | string | Content slug for SEO URLs |
hasSubmenu | string(Y, N) | Does the category appear as a submenu on the member-list page? Only these categories can be viewed by non-admins. |
submenuTitle | string | Title of the submenu |
hasBadge | string(image, text, none) | Does the category have a badge? |
textColor | string | RGB Text Color for Badge |
bgColor | string | RGB Background Color for Badge |
opacity | string | Opacity for text background |
badgePosition | string(avatar-topLeft, avatar-topRight, avatar-bottomLeft, avatar-bottomRight) | Position for badge |
imageId | string | Content-id for badge image |
imageUrl | string | URL for badge image |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Query: GET /2.0/MemberCategory/recent
Finds member categories, sorted by date created.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Comment
A comment on a content object.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
description | string | Scrubbed HTML for the comment text. |
url | url | URL to appropriate detail page for the object |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/Comment
Create a new Comment to attach to a content object
Field | Type | Required? | Description |
---|---|---|---|
description | string | ![]() |
Body of the comment if @param attachedTo |
attachedTo | ID | ![]() |
ID of the content object this comment will belong to (appId:contentType:entryId [2026274:BlogEntry:530]) |
Update: PUT /2.0/Comment
Delete: DELETE /2.0/Comment
Get: GET /2.0/Comment
Retrieve one or more Comments
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Comment object to retrieve. Can be specified more than once. |
Query: GET /2.0/Comment/recent
Query: GET /2.0/Comment/featured
Network
Fields
Properties:
Field | Type | Description |
---|---|---|
ID | integer | System application ID for the network |
subdomain | string | Network’s subdomain under .ning.com |
author | string | screenName of the network creator |
createdDate | date | When the network was created |
iconUrl | url | URL of the network’s avatar image |
defaultUserIconUrl | url | URL of the default user avatar image in the network |
apiVersions | hash | Map of content type to version number, indicating what version of which API endpoints this network supports |
profileQuestions | array | Profile questions for the network |
profileQuestions
Each element of the profileQuestions array is a hash with the following structure.
Field | Type | Required? | Description |
---|---|---|---|
index | integer | ![]() |
The unique index of this profile question. Used when referencing profile question answers in User objects. |
title | string | ![]() |
The text of the profile question. |
type | string | ![]() |
The type of the profile question: gender, location, select, text, date, url, textarea. |
search | boolean | ![]() |
Whether this question is part of Advanced Member Search. |
featured | boolean | ![]() |
Whether answers to this question is featured on the member listing page. |
private | boolean | ![]() |
Whether answers to this question are kept from being displayed on profile pages. |
required | boolean | ![]() |
Whether answering this question is required. |
year | boolean | For date type questions only – whether multiple answers are allowed. | |
multiple | boolean | For select type questions only – whether multiple answers are allowed. | |
category | boolean | For select type questions only – whether the answer to the question determines a member’s category. | |
choices | array | For select type questions only – the allowed choices for answer(s) to the question. |
Get: GET /2.0/Network
SitePage
A SitePage connects an entity to the user interface. It is a wrapper for an entity, such as a bundle, custom page, members page, social channel, or URL.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
title | string | The user-customizable title of the page. |
author | string | screenName of the creator of this object |
viewerTypes | array(string) | Who is allowed to view this page |
tabLabel | string | The text for the tab. |
targetType | string(blogBundle, discussionBundle, photoBundle, channel, customPage, groupHub, url, members, profileLink, groupMembers) | The type of target: e.g., blogBundle. |
target | string | A url or content ID, depending on the targetType. |
windowTarget | string | The value to use for the windowTarget attribute in the anchor tag for this page when it is rendered as a tab in the navigation. |
published | string(Y, N) | Whether this SitePage is published and viewable by all users or if it is only viewable by admins |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/SitePage
Create a new SitePage. Note that the navigation tree is currently all done in JS in the sitebuilder UI. There’s no simple way of just specifying what the parent page of a new SitePage should be, so all SitePages created through this call will be unlinked and need to be put in the proper place via the web UI.
Field | Type | Required? | Description |
---|---|---|---|
targetType | string | ![]() |
What kind of SitePage to create – blogBundle, channel, customPage, discussionBundle, photoBundle, groupHub, url, profileLink, profilePage, members, groupMembers |
published | boolean | true for general visibility, false for NC/Admin visibility only | |
customPath | string | ![]() |
URL (relative to site root or group root) |
groupId | ID | Id of the group if this is a Group SitePage | |
viewerType | string | ![]() |
Who is allowed to view the content in this SitePage. For network SitePage: all, member, featured, admin For group SitePage: all, member, groupMember, groupAdmin |
contributorType | string | ![]() |
Who is allowed to contribute to this SitePage: For network SitePage: admin, featured, member For group SitePage: groupMember, groupAdmin |
title | string | Title of the SitePage | |
tabLabel | string | Label for the navigation tab | |
commentType | string | For SitePages that allow comments, what kind of comments? ning, disqus, none | |
commentOrdering | string | Only if commentType is “ning” – “desc” means to show newest comments on top, “asc” for oldest on top | |
disqusShortname | string | Only if commentType is “disqus” – required “shortname” to use with disqus that identifies your site. | |
categoryNames | string | Comma-delimited list of categories that the SitePage should support. (For SitePage types that allow categories.) | |
moderateContent | boolean | Whether content added to this SitePage requires moderation | |
htmlComments | boolean | Whether HTML is allowed in comments on content in this SitePage. Only used if the commentType is “ning” | |
openInNewWindow | boolean | Whether clicking on this SitePage’s navigation tab opens the target in a new window | |
isHomePage | boolean | Whether this SitePage should be the site’s homepage | |
target | string | For url type only – the URL that the SitePage links to. | |
defaultMembersView | string | For members type only – what the default members list page sort is. Either “mostRecent” or | |
feeds | optional | ![]() |
string For channel type only – the feeds for the channel; for example, [{“type”: “vimeo”, “id”: “staffpicks”}, {“type”: “youtube”, “id”: “stanfordbusiness”}] . You can specify 3 Vimeo feeds and 3 YouTube feeds. |
Get: GET /2.0/SitePage
Retrieve information about a given SitePage object
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the SitePage |
Bulk
Fields
Properties:
Field | Type | Description |
---|
Get: GET /2.0/Bulk
Retrieve details on a Bulk request
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the BulkRequest |
Create: POST /2.0/Bulk
Submit a batch of requests for execution.
Field | Type | Required? | Description |
---|---|---|---|
requests | json array | ![]() |
Array of requests to execute |
Group
A group of members within the site.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
title | string | Plain-text title of the group. |
description | string | Returns the description scrubbed of unsafe code. |
url | url | URL to appropriate detail page for the object |
featureTime | date | Time at which the group was featured, or null if not featured. |
slug | string | Last part of the URL. |
termForMembers | string | Returns what members of this group should be called. |
imageUrl | string | The URL of the group image. |
coverPhotoUrl | string | The URL of the cover photo. |
approved | boolean | Indicates whether this group is approved or not. This can be false only if moderation is turned on for the group hub |
moderateMembers | boolean | Indicates whether new members need to be approved by a group admin when they join. |
membersCanSendInvites | boolean | Indicates whether regular group members can send invitations to this group. |
joinSetting | string(anyone, invitation, none) | The setting for who can join a group |
adminsCanAddAndDeletePages | boolean | Returns whether an admin in this group can add and delete pages in the site builder. |
adminsCanMessageMembers | boolean | Returns whether an admin in this group can send messages to group members |
layoutPermissionType | string(basic,advanced,complete) | Returns the layout permission type for this group |
adminsCanUploadCoverPhotos | boolean | Returns whether an admin in this group can upload a cover photo for this group. |
customPaths | string | Json encoded map of SitePage slugs to SitePage ids for this group. |
navigationTree | string | Json encoded structure for storing the groups navigation tree. This is a two dimensional array of SitePage objects where the first entry in every row is the top level tab and any further entries in that row are subtabs of that tab. Currently groups are not allowed to have subtabs. |
homepageId | string | Returns the ID of the SitePage that is the homepage. |
categoryNames | array(string) | Categories that this object is in |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/Group
Creates a Group. The site must have a groupHub SitePage before a group can be created.
Field | Type | Required? | Description |
---|---|---|---|
title | string | ![]() |
Plain-text title of the group. |
description | string | ![]() |
HTML for the group’s description. |
joinSetting | string(anyone, invitation, none) | ![]() |
The setting for who can join a group. |
termForMembers | string | What members of this group should be called, such as “Members” or “Luddites”. | |
image | binary image data | The group image. | |
coverPhoto | binary image data | The cover-photo image placed behind the group heading. | |
membersCanSendInvites | boolean | Whether regular group members can send invitations to this group. Defaults to true. Forced to false if the site does not allow sign-up. | |
adminsCanAddAndDeletePages | boolean | Whether a group admin can add and delete group pages. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
adminsCanMessageMembers | boolean | Whether a group admin can send broadcast messages to group members. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
adminsCanUploadCoverPhotos | boolean | Whether a group admin can upload a cover photo for their group in addition to a group image. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
layoutPermissionType | string(basic,advanced,complete) | The type of permissions that group admins have to edit the layout for group pages. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
slug | string | Last part of the URL. Leave null to generate a slug from the title. | |
categoryNames | string | Comma-delimited list of categories for the group. Each category must be a valid group category. |
If an image is included, the request should be made as a MIME multipart message. Otherwise the request should be a standard form-encoded POST.
Update: PUT /2.0/Group
Updates a Group.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
The ID of the Group to update. |
title | string | ![]() |
Plain-text title of the group. |
description | string | ![]() |
HTML for the group’s description. |
joinSetting | string(anyone, invitation, none) | ![]() |
The setting for who can join a group. |
termForMembers | string | What members of this group should be called, such as “Members” or “Luddites”. | |
image | binary image data | The group image. | |
coverPhoto | binary image data | The cover-photo image placed behind the group heading. | |
membersCanSendInvites | boolean | Whether regular group members can send invitations to this group. Defaults to true. Forced to false if the site does not allow sign-up. | |
adminsCanAddAndDeletePages | boolean | Whether a group admin can add and delete group pages. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
adminsCanMessageMembers | boolean | Whether a group admin can send broadcast messages to group members. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
adminsCanUploadCoverPhotos | boolean | Whether a group admin can upload a cover photo for their group in addition to a group image. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
layoutPermissionType | string(basic,advanced,complete) | The type of permissions that group admins have to edit the layout for group pages. Leave as null to use the site-wide setting from the GroupHub. Only site admins can set this value. | |
slug | string | Last part of the URL. Leave null to generate a slug from the title. | |
categoryNames | string | Comma-delimited list of categories for the group. Each category must be a valid group category. |
If an image is included, the request should be made as a MIME multipart message. Otherwise the request should be a standard form-encoded POST.
Delete: DELETE /2.0/Group
Deletes the Group with the given ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Group to delete |
Get: GET /2.0/Group
Retrieve one or more Groups by ID.
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Group object to retrieve. Can be specified more than once. |
Query: GET /2.0/Group/recent
Finds groups, sorted by date created.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Group/featured
Finds featured groups, sorted by date featured.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Group/count
Finds the number of Group objects created after the given date.
Field | Type | Required? | Description |
---|---|---|---|
createdAfter | date | ![]() |
The date to start counting after. If the date is more than a week old, an error is returned. |
Message
A message in Ning’s messaging system. If you send a message to three recipients, three messages (and three message IDs) will be created: one for each recipient. But each message will have the same value for $recipients.
Fields
Properties:
Field | Type | Description |
---|---|---|
id | ID | The ID of the object |
createdDate | date | When the object was created |
updatedDate | date | When the object was last changed |
author | string | screenName of the creator of this object |
title | string | The subject line. |
description | string | The unscrubbed HTML message, plus any replies. The caller is responsible for scrubbing any malicious JavaScript from the message. |
url | url | URL to appropriate detail page for the object |
recipients | array | Returns the screen names of the recipients. |
sender | string | Screen name of the user who created the message. |
subject | string | The subject line. |
body | string | The unscrubbed HTML message, plus any replies. The caller is responsible for scrubbing any malicious JavaScript from the message. |
forwardedDate | date | ISO-8601 date on which the message was forwarded. |
repliedDate | date | ISO-8601 date on which the message was replied. |
read | boolean | Whether this message has been viewed. |
hasReplies | boolean | Returns whether the recipient has replied to this message. |
forwarded | boolean | Returns whether this message has been forwarded. |
Sub-Properties:
Field | Type | Description |
---|---|---|
author.fullName | string | The full name of the author. |
author.iconUrl | url | The URL of the author’s profile picture |
author.url | url | The URL of the author’s profile page |
Create: POST /2.0/Message
Creates a entry for Message and saves it.
Field | Type | Required? | Description |
---|---|---|---|
recipients | string | ![]() |
JSON array of screen names |
subject | string | ![]() |
the subject line |
body | string | ![]() |
the unscrubbed HTML message |
boolean | ![]() |
whether to send an email notification to the recipients about the new message |
Update: PUT /2.0/Message
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ![]() |
ID of the Message to update |
folder | string | A folder to move the message to: Inbox, Sent, or Archive | |
read | boolean | Whether to mark the message as read or unread |
Query: GET /2.0/Message/inbox
Returns messages in the Inbox.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Message/sent
Returns sent messages.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described at Pagination and Result Set Size
Query: GET /2.0/Message/archive
Returns messages in the Archive.
Field | Type | Required? | Description |
---|---|---|---|
count | integer | ![]() |
The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
This request supports pagination as described in Pagination and Result Set Size
Pagination and Result Set Size
This section describes the standard way that Ning 3.0 API query endpoints (/2.0/ContentType/somequery) implement paging through a result set.
Request
Field | Type | Description |
---|---|---|
count | integer | The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
The count parameter indicates, at most, how many elements will be returned in a page of the result set. If not specified, the behavior is undefined. If a count greater than 100 is specified, it is treated as 100.
Paging through a result set requires use of the anchor parameter. If a response to a query request is not the entire result set (that is, there are previous or additional pages of response data), then the anchor key in the response JSON will be set to an opaque string identifier. Specifying this identifier as the value of the anchor parameter, along with a count, in a subsequent request to the same query endpoint will retrieve additional entries in the result set.
A positive count supplied with an anchor means "get me at most this many additional entries in the result set". A negative count supplied with an anchor means "get me at most this many previous entries in the result set." If a count less than -100 is specified, it is treated as -100.
Response
Field | Type | Description |
---|---|---|
firstPage | boolean | true if response is first page of result set; otherwise false |
lastPage | boolean | true if response is last page of result set; otherwise false |
If the response to a query request is the first page of the result set, then the firstPage key in the response JSON is set to true. If not, it’s set to false.
If the response to a query request is the last page of the result set, then the lastPage key in the response JSON is set to true. If not, it’s set to false.