Please use version 1.0 of the API to retrieve tokens.
- Article
- BlogPost
- Bulk
- Bundle
- Comment
- Discussion
- Event
- Group
- GroupMembership
- MemberCategory
- Message
- Network
- Photo
- SitePage
- User
- UserByName
- Pagination and Result Set Size
- Alternate Binary Upload
Article
Manage articles in 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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | Plain-text title of the entry. |
description | string | null | |
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 StorageId of the 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 |
rating | unknown | Undocumented |
createdDateLocal | string | Returns the createdDate in network local time |
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/Article
Create a new Article.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ✅ | ID of the Bundle content object this article will belong to |
title | string | ✅ | Title of the article |
description | string | ✅ | Body of the article |
excerpt | string | Excerpt of the article that appears in various summary and list views | |
slug | string | Slug for the article (for its URL) | |
tagNames | string | Comma-delimited list of tags for the article | |
categoryNames | string | Comma-delimited list of categories for the article. 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 article as a draft | |
image | binary image data | Image to attach to the article | |
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
Update: PUT /2.0/Article
Update an existing Article. When editing a article, 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 article object to update |
title | string | ✅ | Title of the article |
description | string | ✅ | Body of the article |
excerpt | string | Excerpt of the article that appears in various summary and list views | |
slug | string | Slug for the article (for its URL) | |
tagNames | string | Comma-delimited list of tags for the article | |
categoryNames | string | Comma-delimited list of categories for the article. 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 article as a draft | |
image | binary image data | Image to attach to the article | |
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
Delete: DELETE /2.0/Article
Deletes the Article with the provided ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ✅ | The ID of the Article to delete |
Get: GET /2.0/Article
Retrieve one or more Article objects by ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ✅ | ID of the Article object to retrieve. Can be specified more than once. |
Query: GET /2.0/Article/recent
Finds Article 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/Article/featured
Finds Article 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/Article/count
Find the number of Article 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
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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | Plain-text title of the entry. |
description | string | null | |
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 StorageId of the 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 |
rating | unknown | Undocumented |
createdDateLocal | string | Returns the createdDate in network local time |
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
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
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. Available to NC only. |
Create: POST /2.0/Bulk
Submit a batch of requests for execution.
Field | Type | Required? | Description |
---|---|---|---|
requests | json array | ✅ | Array of requests to execute. Available to NC only. |
Bundle
A collection of Entry objects, which may be BlogPosts, Discussions, or Photos. 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: a random alphanumeric string uniquely identifying 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. |
fileUploadsEnabledForComments | boolean | Whether to display the file-upload button on comments. |
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 |
moderateComment | boolean | Setting that indicates whether comment is moderated for non admin users in this bundle |
categoryRequired | boolean | Setting that indicates whether contributions require a category selection or not. |
sitePageId | string | Content ID of the associated SitePage |
groupId | string | Returns the ID of the group that this content is associated with. |
createdDateLocal | string | Returns the createdDate in network local time |
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. |
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”, “Discussion” and “Article”. |
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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | Title of comment |
description | string | Scrubbed HTML for the comment text. |
url | url | URL to appropriate detail page for the object |
createdDateLocal | string | Returns the createdDate in network local time |
updatedDateLocal | string | Returns the updatedDate in network local time |
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 |
attachedTo | string | ✅ | ID ID of the content object this comment will belong to (appId:contentType:entryId [2026274:BlogEntry:530]) |
Update: PUT /2.0/Comment
Update a Comment
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ✅ | ID of the Comment object to update. |
description | string | ✅ | Updated comment text. |
Delete: DELETE /2.0/Comment
Delete a Comment
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ✅ | ID of the Comment object to delete. |
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
Retrieve Comments sorted by create date.
Field | Type | Required? | Description |
---|---|---|---|
attachedTo | ID | ✅ | ID of the content object comments are attached to. |
count | integer | ✅ | The number of results to retrieve (up to 100). |
anchor | string | An opaque token encoding the page of results returned. |
Query: GET /2.0/Comment/featured
Retrieve featured comments.
Field | Type | Required? | Description |
---|---|---|---|
attachedTo | ID | ✅ | ID of the content object comments are attached to. |
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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | Plain-text title of the entry. |
description | string | null | |
url | url | URL to appropriate detail page for the object |
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 |
rating | unknown | Undocumented |
createdDateLocal | string | Returns the createdDate in network local time |
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 new 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 (for its URL) | |
tagNames | string | Comma-delimited list of tags for the discussion | |
categoryNames | string | Comma-delimited list of categories |
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 (for its URL) | |
tagNames | string | Comma-delimited list of tags for the discussion | |
categoryNames | string | Comma-delimited list of categories |
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
Event
An event.
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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | Plain-text title of the entry. |
description | string | null | |
url | url | URL to appropriate detail page for the object |
location | string | A general location, such as “The Fillmore”. |
allDay | boolean | Whether the event lasts all day. |
startTime | string | ISO-8601 date and time at which the event begins. |
endTime | string | ISO-8601 date and time at which the event ends. |
timezone | string | The user’s timezone; for example, America/Los_Angeles. |
closed | boolean | Whether the event is closed to anyone who has not RSVP’d yet. |
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 |
imageUrl | string | |
imageId | string | The StorageId of the content object storing the image data. |
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 |
createdDateLocal | string | Returns the createdDate in network local time |
slug | string | Content slug for SEO URLs |
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/Event
Create a new Event.
Field | Type | Required? | Description |
---|---|---|---|
bundleId | ID | ✅ | ID of the Bundle content object this event will belong to. |
title | string | ✅ | Title of the event |
description | string | ✅ | Description of the event |
location | string | ✅ | Location of the event |
start | date | ✅ | Start date and time of the event (ISO8601, example: 2023-04-03T11:10:14+00:00) |
end | date | ✅ | End date and time of the event (ISO8601, example: 2023-04-03T11:10:14+00:00) |
allDay | boolean | ✅ | All day event |
timezone | string | ✅ | Timezone of the event |
tagNames | string | Comma-delimited list of tags for the event | |
slug | string | Slug for the event (for its URL) | |
publishStatus | string | “draft” to save the event as a draft | |
publishTime | date | “now” | Timestamp to set publish time to, or “now” to set publish time to current time. * | |
image | binary image data | Image to attach to the event |
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
Get: GET /2.0/Event
Retrieve one or more Event objects by ID
Field | Type | Required? | Description |
---|---|---|---|
id | ID | ✅ | ID of the Event object to retrieve. Can be specified more than once. |
Query: GET /2.0/Event/recent
Finds Event 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/Event/featured
Finds Event 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/Event/count
Find the number of Event 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
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: a random alphanumeric string uniquely identifying 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, In case of migration we are creating it internally if not present for rest we are throwing exception.
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 | booleanString(‘true’,’false’,”,null) | 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 | booleanString(‘true’,’false’,”,null) | 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 | booleanString(‘true’,’false’,”,null) | 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 | booleanString(‘true’,’false’,”,null) | 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 | booleanString(‘true’,’false’,”,null) | 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 | booleanString(‘true’,’false’,”,null) | 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. |
GroupMembership
An association between a Group and a User. If Joe joins 3 groups, and Sarah adds 4, there will be 7 GroupMemberships.
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: a random alphanumeric string uniquely identifying the creator of this object |
title | unknown | Undocumented |
description | unknown | Undocumented |
url | url | URL to appropriate detail page for the object |
groupId | string | ID of the Group object |
fullName | string | Full name of the user. Keep this in sync with User->title. |
screenName | string | Screen name of the user. Use this instead of contributorName, which may be different. |
status | string(member, admin, banned, pending) | Status of the person in relation to the group. |
memberDate | date | Date on which the user joined the group |
adminDate | date | Date on which the user was made an administrator |
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/GroupMembership/recent
Retrieves a page of (approved) group members ordered by most-recently-created first; the start and end are specified using a paging anchor, which is an opaque token that encodes the page of results returned.
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 | |
sort | string | ✅ | A Xn_XapiPagingAnchorSort sort constant |
status | array | ✅ | Statuses of group members to include; admin and/or member |
groupId | ID | ✅ | ID(s) of the group(s) whose members to retrieve |
This request supports pagination as described at Pagination and Result Set Size
MemberCategory
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: a random alphanumeric string uniquely identifying 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
Message
A message in Ning’s messaging system. Replacement for XN_Message. 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: a random alphanumeric string uniquely identifying 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. |
priority | number | Unique ID for the message thread. If you forward a message, the forwarded message gets a new thread ID. |
isBroadcast | string | Unique ID for the message thread. If you forward a message, the forwarded message gets a new thread ID. |
doNotReply | string | Unique ID for the message thread. If you forward a message, the forwarded message gets a new thread ID. |
showMessage | string | Show message body or not |
customSenderName | string | Unique ID for the message thread. If you forward a message, the forwarded message gets a new thread ID. |
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
Sends a Message.
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
Updates a 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 at Pagination and Result Set Size
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: a random alphanumeric string uniquely identifying 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
Retrieve network details. No ID parameter, this just operates on the current network.
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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | Plain-text title of the entry. |
description | string | null | |
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 |
rating | unknown | Undocumented |
createdDateLocal | string | Returns the createdDate in network local time |
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 new 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 | Description of the photo | |
slug | string | Slug for the photo (for its URL) | |
image | image | ✅ | The image data (full path to photo) |
tagNames | string | Comma-delimited list of tags for the photo | |
categoryNames | string | Comma-delimited list of categories |
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
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 | Description of the photo | |
slug | string | Slug for the photo (for its URL) | |
image | image | The image data | |
tagNames | string | Comma-delimited list of tags for the photo | |
categoryNames | string | Comma-delimited list of categories |
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.
This request supports alternate methods of binary upload as described at Alternate Binary Upload
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
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: a random alphanumeric string uniquely identifying the creator of this object |
viewerTypes | array(string) | Who is allowed to view this page |
tabLabel | string | The text for the tab. |
targetType | string(articleBundle, eventBundle, blogBundle, discussionBundle, photoBundle, videoBundle, musicBundle, channel, customPage, groupHub, url, members, profilePage, profileLink, groupMembers, chat, pollBundle, donatePage, instagramFeed, ebayFeed, landingPage, builderPage) | 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 |
groupId | string | The id of the group this page belongs to, or null if this is a network page |
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” | |
fileUploadsEnabledForComments | boolean | Whether to display the file-upload button in comment boxes. 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 | 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 |
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: a random alphanumeric string uniquely identifying the creator of this object |
title | string | screenName: a random alphanumeric string uniquely identifying this user |
description | string | Copied from system profile |
url | url | URL to appropriate detail page for the object |
profileVisibility | string(all, members, friends) | The profile visibility settings for content of this user. |
string | Email address. Will only be returned if the request is from an admin. | |
fullName | string | Full name, for searching |
birthdate | string | Copied from system profile |
displayAge | string(Y, N, B) | Whether to display the person’s age. B = display birthday Y = display age & birthday N = display nothing |
gender | string | Copied from system profile |
displayGender | string(Y, N) | Whether to display the person’s gender |
location | string | Copied from system profile |
zip | string | For storing zip information entered by the user – from system profile |
country | string | Copied from system profile |
photo | string | Copied from system profile |
approved | Unknown | For User isApproved() is a little different, because a member is approved when they are no longer pending, but they can also be banned later. User::isMember() is called, because it deals with all these conditions, which seem to be the best equivalent to isApproved for other XG_Model classes. |
admin | Unknown | Returns whether the user is an admin. Note that this returns false for the network creator. Moreover, it may return true for banned users. It is better to use $user->is()->admin() which returns true if the user is an admin (including the network creator). |
featured | bool | Whether this user is featured. |
featuredDate | date | For a featured user, when the user was featured. |
status | unknown | Undocumented |
coverPhoto | string | Get cover photo URL for the given user |
profileQuestions | Array | Get profile questions and answers for the given user |
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 | |
coverPhoto | image | Full path to profile cover photo for the 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. N for no, Y 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 an exist User
Field | Type | Required? | Description |
---|---|---|---|
array | $params | ✅ | id ID ID of user to update email string optional Email address of the user fullName string optional Full name of the user slug string optional The last part of the URL for the user’s profile page password string optional Plaintext password for the user authInfo string optional JSON-encoded object of auth info for the 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 date optional Date of birth in the format yyyy-mm-dd displayAge string optional whether to display age, birthday, or neither in the user’s profile. Y for only age, B for both, N for neither photo image optional Full path to profile photo (avatar) for the user coverPhoto image optional Full path to profile cover photo for the user gender string optional Gender for the user’s profile. m for male, f for female displayGender integer optional Whether to display gender in the user’s profile. N for no, Y for yes. Defaults to yes. location string optional City name for the user’s profile zip string optional ZIP code for the user’s profile (US only) country string optional 2-letter country code for the new user’s profile question_n string optional Answer to profile question #n. Can be specified more than once (with different values of n) approved boolean optional 1 to approve the user (cannot un-approve) blocked boolean optional 1 to block the user, 0 to unblock reason string optional Reason for blocking the user spam boolean optional 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 POST.
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 | screenName: a random alphanumeric string uniquely identifying 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
UserByName
Fields
Properties:
Field | Type | Description |
---|
Get: GET /2.0/UserByName
Field | Type | Required? | Description |
---|---|---|---|
array | $params | ✅ | name – required, user name to find count – users count to return, max 100, default 10 |
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
.
Alternate Binary Upload
For API requests that support file upload (such as creating or updating a Photo
or BlogPost
), the standard mechanism for file upload, including the file as one of the request parameters in a MIME multipart formatted request, works just fine.
However, for internal convenience, particularly for loading bulk data via a migrator, we support two alternate methods for attaching binary data to a request: from a URL and from a content object ID.
From a URL
If a request would otherwise support putting some binary data in a field named image, then instead you can put a URL in a field named imageFromUrl
and the binary data will be slurped from that URL and saved as if it were uploaded with the request.
If appropriately-typed binary data can not be retrieved from that URL the request will return an error.
From a Content Object ID
If a request would otherwise support putting some binary data in a field named image, then instead you can put a content object ID in a field named imageFromId and the existing binary data in an UploadedFile
content object with that ID will be used.
If the supplied ID does not reference a valid UploadedFile
content object in the target network the request will return an error.
Undocumented
The following items are not documented:
- Article->rating
- BlogPost->rating
- Model: Bulk
- Discussion->rating
- GroupMembership->title
- GroupMembership->description
- Model: Network
- Photo->rating
- User->status
- Model: UserByName
- Endpoint: GET /2.0/UserByName