<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.substance.net/views-api-docs/index.php?action=history&amp;feed=atom&amp;title=Rest_-_Contacts_-_Groups</id>
	<title>Rest - Contacts - Groups - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.substance.net/views-api-docs/index.php?action=history&amp;feed=atom&amp;title=Rest_-_Contacts_-_Groups"/>
	<link rel="alternate" type="text/html" href="https://www.substance.net/views-api-docs/index.php?title=Rest_-_Contacts_-_Groups&amp;action=history"/>
	<updated>2026-04-29T09:03:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://www.substance.net/views-api-docs/index.php?title=Rest_-_Contacts_-_Groups&amp;diff=310&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;==Purpose==  Used for creating, editing and deleting Groups from the Views system.  ===Base URL=== https://app.viewsapp.net/api/restful/contacts/groups  ===Schema=== &lt;nowiki&gt;https://app.viewsapp.net/api/restful/contacts/groups/schema(.xml|.json|.xsd)&lt;/nowiki&gt;  ==Creating a group==  Once you have created your data file, you can send it using the following:   curl --url &lt;Base URL&gt; -u&lt;username&gt;:&lt;password&gt; -H Content-Type:text/xml -X POST -d &quot;&lt;xml&gt;&quot;  If there is a problem wi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.substance.net/views-api-docs/index.php?title=Rest_-_Contacts_-_Groups&amp;diff=310&amp;oldid=prev"/>
		<updated>2025-04-04T08:44:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Purpose==  Used for creating, editing and deleting Groups from the Views system.  ===Base URL=== https://app.viewsapp.net/api/restful/contacts/groups  ===Schema=== &amp;lt;nowiki&amp;gt;https://app.viewsapp.net/api/restful/contacts/groups/schema(.xml|.json|.xsd)&amp;lt;/nowiki&amp;gt;  ==Creating a group==  Once you have created your data file, you can send it using the following:   curl --url &amp;lt;Base URL&amp;gt; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml -X POST -d &amp;quot;&amp;lt;xml&amp;gt;&amp;quot;  If there is a problem wi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
Used for creating, editing and deleting Groups from the Views system.&lt;br /&gt;
&lt;br /&gt;
===Base URL===&lt;br /&gt;
https://app.viewsapp.net/api/restful/contacts/groups&lt;br /&gt;
&lt;br /&gt;
===Schema===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;https://app.viewsapp.net/api/restful/contacts/groups/schema(.xml|.json|.xsd)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating a group==&lt;br /&gt;
&lt;br /&gt;
Once you have created your data file, you can send it using the following:&lt;br /&gt;
&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml -X POST -d &amp;quot;&amp;lt;xml&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If there is a problem with creating that record, you will get a response containing all the errors, plus a copy of the translated data you supplied.&lt;br /&gt;
&lt;br /&gt;
If the record was created successfully, the service will return a complete record for the newly created record if the attribute id set as the newly created id.&lt;br /&gt;
&lt;br /&gt;
==Fetching a group==&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt;/&amp;lt;id&amp;gt; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml&lt;br /&gt;
&lt;br /&gt;
This will return an xml file similar to this&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;group id=&amp;quot;100001&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Name&amp;gt;Group&amp;lt;/Name&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;Created&amp;gt;2011-05-09 10:26:09&amp;lt;/Created&amp;gt;&lt;br /&gt;
    &amp;lt;CreatedBy&amp;gt;a.user&amp;lt;/CreatedBy&amp;gt;&lt;br /&gt;
    &amp;lt;Updated&amp;gt;2011-05-09 10:26:09&amp;lt;/Updated&amp;gt;&lt;br /&gt;
    &amp;lt;UpdatedBy&amp;gt;a.user&amp;lt;/UpdatedBy&amp;gt;&lt;br /&gt;
    &amp;lt;Archived&amp;gt;0000-00-00 00:00:00&amp;lt;/Archived&amp;gt;&lt;br /&gt;
    &amp;lt;ArchivedBy&amp;gt;&amp;lt;/ArchivedBy&amp;gt;&lt;br /&gt;
    &amp;lt;GroupID&amp;gt;100001&amp;lt;/GroupID&amp;gt;&lt;br /&gt;
    &amp;lt;TypeName&amp;gt;group&amp;lt;/TypeName&amp;gt;&lt;br /&gt;
 &amp;lt;/group&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fetching multiple groups records in one call==&lt;br /&gt;
It is possible to use the search endpoint to retrieve multiple records&lt;br /&gt;
&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt;/search?ids[]=xxx&amp;amp;ids[]=xxx&amp;amp;ids[]=xxx&amp;amp; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml &lt;br /&gt;
&lt;br /&gt;
Depending on how many you are fetching, you may need to use POST rather than GET&lt;br /&gt;
&lt;br /&gt;
==Searching for a group==&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt;/search?q=&amp;lt;query&amp;gt; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml &lt;br /&gt;
* query - This is a text string to use to search for in the groups records&lt;br /&gt;
&lt;br /&gt;
You can search for any field for a specific value by setting the field as a parameter. Please refer to the schema for fieldnames.&lt;br /&gt;
&lt;br /&gt;
There are also a series of fields that you use -from and -to modifiers to express a range:&lt;br /&gt;
* Created - yyyy-mm-dd&lt;br /&gt;
* Updated - yyyy-mm-dd&lt;br /&gt;
* Archived - yyyy-mm-dd&lt;br /&gt;
&lt;br /&gt;
==Updating a group==&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt;/&amp;lt;id&amp;gt; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml -X PUT -d &amp;quot;&amp;lt;xml&amp;gt;&amp;quot;&lt;br /&gt;
* id - The ID of the group&lt;br /&gt;
&lt;br /&gt;
The XML should be in the same format as the create XML. However, you only need to supply fields that you wish to update. For example:&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;group id=&amp;quot;100001&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Name&amp;gt;Group&amp;lt;/Name&amp;gt;&lt;br /&gt;
 &amp;lt;/group&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;The above would result in updating group 1000001&amp;#039;s Name value&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Archiving a group==&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt;/&amp;lt;id&amp;gt;/archive -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml -X PUT -d &amp;#039;&amp;lt;status&amp;gt;1&amp;lt;/status&amp;gt;&amp;#039;&lt;br /&gt;
* id - The ID of the group&lt;br /&gt;
&lt;br /&gt;
This will set the archive flag on a group. If you set the status to 0, then it will remove the archive flag.&lt;br /&gt;
&lt;br /&gt;
==Deleting a group==&lt;br /&gt;
 curl --url &amp;lt;Base URL&amp;gt;/&amp;lt;id&amp;gt; -u&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H Content-Type:text/xml -X DELETE&lt;br /&gt;
* id - The ID of the group&lt;br /&gt;
&lt;br /&gt;
This should be used with great care as it will permanently delete a group record.&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
	</entry>
</feed>