Field Squared API Services

<back to all web services

PortalFolder

Gives access to the PortalFolder Collection within the system

The following routes are available for this service:
GET,DELETE/{Workspace}/CustomerPortal/Folder/{ObjectId}
GET/{Workspace}/CustomerPortal/Folder/All/{ObjectId}
GET/{Workspace}/CustomerPortal/Folder/Children/{ObjectId}
GET/{Workspace}/CustomerPortal/Folder/Trunk/Node
GET/{Workspace}/CustomerPortal/Folder/Trunk/All
GET,DELETE/{Workspace}/PortalFolder/{ObjectId}
GET/{Workspace}/PortalFolder/All/{ObjectId}
GET/{Workspace}/PortalFolder/Children/{ObjectId}
GET/{Workspace}/PortalFolder/Trunk/Node
GET/{Workspace}/PortalFolder/Trunk/All
POST/{Workspace}/PortalFolder/Trunk/{Name}
GET/{Workspace}/PortalFolder/All/Id/{ObjectId}
GET/{Workspace}/PortalFolder/Trunk/All/Id
POST/{Workspace}/PortalFolder/{ParentFolderId}/Name/{Name}
POST/{Workspace}/PortalFolder
GET/{Workspace}/CustomerPortal/Folder/All/Id/{ObjectId}
GET/{Workspace}/CustomerPortal/Folder/Trunk/All/Id
POST/{Workspace}/CustomerPortal/Folder/{ParentFolderId}/Name/{Name}
POST/{Workspace}/CustomerPortal/Folder
import 'package:servicestack/servicestack.dart';

/**
* Gives access to the PortalFolder Collection within the system
*/
class PortalFolder implements IConvertible
{
    String? ObjectId;
    String? Workspace;
    String? Name;
    List<String>? Teams;
    String? ParentFolderId;
    List<String>? Ancestors;
    bool? Enabled;
    bool? IsTrunk;
    bool? IsValid;

    PortalFolder({this.ObjectId,this.Workspace,this.Name,this.Teams,this.ParentFolderId,this.Ancestors,this.Enabled,this.IsTrunk,this.IsValid});
    PortalFolder.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ObjectId = json['ObjectId'];
        Workspace = json['Workspace'];
        Name = json['Name'];
        Teams = JsonConverters.fromJson(json['Teams'],'List<String>',context!);
        ParentFolderId = json['ParentFolderId'];
        Ancestors = JsonConverters.fromJson(json['Ancestors'],'List<String>',context!);
        Enabled = json['Enabled'];
        IsTrunk = json['IsTrunk'];
        IsValid = json['IsValid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ObjectId': ObjectId,
        'Workspace': Workspace,
        'Name': Name,
        'Teams': JsonConverters.toJson(Teams,'List<String>',context!),
        'ParentFolderId': ParentFolderId,
        'Ancestors': JsonConverters.toJson(Ancestors,'List<String>',context!),
        'Enabled': Enabled,
        'IsTrunk': IsTrunk,
        'IsValid': IsValid
    };

    getTypeName() => "PortalFolder";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
    'PortalFolder': TypeInfo(TypeOf.Class, create:() => PortalFolder()),
});

Dart PortalFolder DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Workspace}/PortalFolder/Trunk/{Name} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PortalFolder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Workspaces">
  <Ancestors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Ancestors>
  <Enabled>false</Enabled>
  <IsTrunk>false</IsTrunk>
  <Name>String</Name>
  <ObjectId>String</ObjectId>
  <ParentFolderId>String</ParentFolderId>
  <Teams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Teams>
  <Workspace>String</Workspace>
</PortalFolder>