• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

How to create a list

Some tooltip text!
• 2 minutes to read
 • 2 minutes to read

To create a list, use the Lists endpoint.

  • RESTful REST API
  • HTTP RPC Agent API
  • WebApi Proxy API
POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/List HTTP/1.1
Authorization: Bearer {{token}}
Accept: application/json; charset=utf-8
Content-Type: application/json; charset=utf-8

{
  "Name": "My New List",
  "Tooltip": "My New list",
  "UseGroupsAndHeadings": false
}

Response:

{
  "Id": 110,
  "Name": "My New List",
  "Tooltip": "My New list",
  "Deleted": false,
  "Rank": 0,
  "IsCustomList": false,
  "IsMDOList": false,
  "UseGroupsAndHeadings": false,
  "ListType": null,
  "InUseByUserDefinedFields": false,
  "TableRight": null,
  "FieldProperties": {},
  "_Links": {
    "Self": "https://sod.superoffice.com:443/Cust26759/api/v1/List/110/"
  }
}

Use the CreateDefaultListEntity to get the default list JSON structure, then use the SaveListEntity endpoint to persist the new list.

POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/Agents/List/CreateDefaultListEntity HTTP/1.1
Authorization: Bearer {{token}}
Accept: application/json; charset=utf-8

Response:

{
  "Id": 0,
  "Name": null,
  "Tooltip": null,
  "Deleted": false,
  "Rank": 0,
  "IsCustomList": false,
  "IsMDOList": false,
  "UseGroupsAndHeadings": false,
  "ListType": null,
  "InUseByUserDefinedFields": false,
  "TableRight": null,
  "FieldProperties": {}
}

Save the list.

POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/Agents/List/SaveListEntity HTTP/1.1
Authorization: Bearer {{token}}
Accept: application/json; charset=utf-8
Content-Type: application/json

{
  "Name": "MyCustomList",
  "Tooltip": "A list to contain my custom items",
}

Response:

Response
{
  "Id": 106,
  "Name": "MyCustomList",
  "Tooltip": "A list to contain my custom items",
  "Deleted": false,
  "Rank": 0,
  "IsCustomList": false,
  "IsMDOList": false,
  "UseGroupsAndHeadings": false,
  "ListType": null,
  "InUseByUserDefinedFields": false,
  "TableRight": null,
  "FieldProperties": {}
}

Create a list entity using the SuperOffice.WebApi proxy client.

var config = new WebApiOptions(tenant.WebApiUrl);
config.Authorization = new AuthorizationAccessToken("8A:Cust12345.Example-Token", OnlineEnvironment.SOD);
var listAgent = new ListAgent(config);

var listEntity = await listAgent.CreateDefaultListEntityAsync();
listEntity.Name = "MyCustomList";
listEntity.Tooltip = "A list to contain my custom items";
listEntity = await listAgent.SaveListEntityAsync(listEntity);

Back

In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top