POST | /api/DMS/UploadFile |
---|
// @DataContract
export class MetaDataField
{
// @DataMember
public ID?: string;
// @DataMember
public DocumentVeldID?: string;
// @DataMember
public Name?: string;
// @DataMember
public Label?: string;
// @DataMember
public Datatype?: string;
// @DataMember
public PrintLabel?: string;
// @DataMember
public Entity?: string;
// @DataMember
public PrintValue?: string;
// @DataMember
public RegistrationValue?: string;
// @DataMember
public SPSiteColumnName?: string;
// @DataMember
public ShadowName?: string;
// @DataMember
public ShadowDatatype?: string;
// @DataMember
public ShadowSPSiteColumnName?: string;
// @DataMember
public ShadowSPSiteColumnRegistrationValue?: string;
// @DataMember
public ShadowRegistrationValue?: string;
// @DataMember
public IsKeyField?: boolean;
// @DataMember
public KopierenBijNieuweVersie?: boolean;
public constructor(init?: Partial<MetaDataField>) { (Object as any).assign(this, init); }
}
export class UploadFile
{
public RegistrationProfileID?: string;
public NavigationPath?: string;
public FileName?: string;
public Description?: string;
public DocumentUpload?: boolean;
public MetaData?: MetaDataField[];
public DocumentID?: string;
public HoofdDocumentID?: string;
public SubDocumentIDs?: string[];
public constructor(init?: Partial<UploadFile>) { (Object as any).assign(this, init); }
}
export enum MessageType
{
Information = 1,
Warning = 2,
Error = 3,
Success = 4,
}
export class InformationMessageBase implements IInformationMessage
{
public Type?: MessageType;
public Summary?: string;
public FullMessage?: string;
public FieldName?: string;
public KeepOpen?: boolean;
public constructor(init?: Partial<InformationMessageBase>) { (Object as any).assign(this, init); }
}
export class InformationMessages extends Array<InformationMessageBase> implements IInformationMessages
{
public constructor(init?: Partial<InformationMessages>) { super(); (Object as any).assign(this, init); }
}
// @DataContract
export class UploadFileResponse
{
// @DataMember
public DocumentId?: string;
// @DataMember
public DocumentUploadId?: number;
// @DataMember
public DocumentNr?: string;
// @DataMember
public Messages?: InformationMessages;
public constructor(init?: Partial<UploadFileResponse>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/DMS/UploadFile HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UploadFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS.Operations">
<Description>String</Description>
<DocumentID>00000000-0000-0000-0000-000000000000</DocumentID>
<DocumentUpload>false</DocumentUpload>
<FileName>String</FileName>
<HoofdDocumentID>00000000-0000-0000-0000-000000000000</HoofdDocumentID>
<MetaData xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DMS">
<d2p1:MetaDataField>
<d2p1:Datatype>String</d2p1:Datatype>
<d2p1:DocumentVeldID>00000000-0000-0000-0000-000000000000</d2p1:DocumentVeldID>
<d2p1:Entity>String</d2p1:Entity>
<d2p1:ID>00000000-0000-0000-0000-000000000000</d2p1:ID>
<d2p1:IsKeyField>false</d2p1:IsKeyField>
<d2p1:KopierenBijNieuweVersie>false</d2p1:KopierenBijNieuweVersie>
<d2p1:Label>String</d2p1:Label>
<d2p1:Name>String</d2p1:Name>
<d2p1:PrintLabel>String</d2p1:PrintLabel>
<d2p1:PrintValue>String</d2p1:PrintValue>
<d2p1:RegistrationValue>String</d2p1:RegistrationValue>
<d2p1:SPSiteColumnName>String</d2p1:SPSiteColumnName>
<d2p1:ShadowDatatype>String</d2p1:ShadowDatatype>
<d2p1:ShadowName>String</d2p1:ShadowName>
<d2p1:ShadowRegistrationValue>String</d2p1:ShadowRegistrationValue>
<d2p1:ShadowSPSiteColumnName>String</d2p1:ShadowSPSiteColumnName>
<d2p1:ShadowSPSiteColumnRegistrationValue>String</d2p1:ShadowSPSiteColumnRegistrationValue>
</d2p1:MetaDataField>
</MetaData>
<NavigationPath>String</NavigationPath>
<RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
<SubDocumentIDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</SubDocumentIDs>
</UploadFile>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <UploadFileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS.Operations"> <DocumentId>00000000-0000-0000-0000-000000000000</DocumentId> <DocumentNr>String</DocumentNr> <DocumentUploadId>0</DocumentUploadId> <Messages xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.Core.Diagnostics.Interfaces"> <d2p1:InformationMessageBase i:nil="true" /> </Messages> </UploadFileResponse>