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}
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using digitaluapi.ServiceModel;

namespace digitaluapi.ServiceModel
{
    public partial class GetApiKeysRequest
    {
        ///<summary>
        ///Environment type
        ///</summary>
        [ApiMember(Description="Environment type")]
        public virtual string Environment { get; set; }
    }

}

namespace ServiceStack
{
    [DataContract]
    public partial class GetApiKeysResponse
        : IMeta
    {
        [DataMember(Order=1)]
        public virtual List<UserApiKey> Results { get; set; }

        [DataMember(Order=2)]
        public virtual Dictionary<string, string> Meta { get; set; }

        [DataMember(Order=3)]
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

    [DataContract]
    public partial class UserApiKey
        : IMeta
    {
        [DataMember(Order=1)]
        public virtual string Key { get; set; }

        [DataMember(Order=2)]
        public virtual string KeyType { get; set; }

        [DataMember(Order=3)]
        public virtual DateTime? ExpiryDate { get; set; }

        [DataMember(Order=4)]
        public virtual Dictionary<string, string> Meta { get; set; }
    }

}

C# GetApiKeysRequest DTOs

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

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Results: 
	[
		{
			Key: String,
			KeyType: String,
			ExpiryDate: 0001-01-01,
			Meta: 
			{
				String: String
			}
		}
	],
	Meta: 
	{
		String: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}