digitaluapi

<back to all web services

GetApiKeysRequest

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
GET/auth/apikeys
GET/auth/apikeys/{Environment}
import 'package:servicestack/servicestack.dart';

// @DataContract
class UserApiKey implements IMeta, IConvertible
{
    // @DataMember(Order=1)
    String? Key;

    // @DataMember(Order=2)
    String? KeyType;

    // @DataMember(Order=3)
    DateTime? ExpiryDate;

    // @DataMember(Order=4)
    Map<String,String?>? Meta;

    UserApiKey({this.Key,this.KeyType,this.ExpiryDate,this.Meta});
    UserApiKey.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Key = json['Key'];
        KeyType = json['KeyType'];
        ExpiryDate = JsonConverters.fromJson(json['ExpiryDate'],'DateTime',context!);
        Meta = JsonConverters.toStringMap(json['Meta']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Key': Key,
        'KeyType': KeyType,
        'ExpiryDate': JsonConverters.toJson(ExpiryDate,'DateTime',context!),
        'Meta': Meta
    };

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

// @DataContract
class GetApiKeysResponse implements IMeta, IConvertible
{
    // @DataMember(Order=1)
    List<UserApiKey>? Results;

    // @DataMember(Order=2)
    Map<String,String?>? Meta;

    // @DataMember(Order=3)
    ResponseStatus? ResponseStatus;

    GetApiKeysResponse({this.Results,this.Meta,this.ResponseStatus});
    GetApiKeysResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Results = JsonConverters.fromJson(json['Results'],'List<UserApiKey>',context!);
        Meta = JsonConverters.toStringMap(json['Meta']);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Results': JsonConverters.toJson(Results,'List<UserApiKey>',context!),
        'Meta': Meta,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class GetApiKeysRequest implements IConvertible
{
    /**
    * Environment type
    */
    // @ApiMember(Description="Environment type")
    String? Environment;

    GetApiKeysRequest({this.Environment});
    GetApiKeysRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Environment = json['Environment'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Environment': Environment
    };

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

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'GetApiKeysRequest': TypeInfo(TypeOf.Class, create:() => GetApiKeysRequest()),
});

Dart GetApiKeysRequest 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.

GET /auth/apikeys HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetApiKeysResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Results>
    <UserApiKey>
      <Key>String</Key>
      <KeyType>String</KeyType>
      <ExpiryDate>0001-01-01T00:00:00</ExpiryDate>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </UserApiKey>
  </Results>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
</GetApiKeysResponse>