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 Foundation
import ServiceStack

public class GetApiKeysRequest : Codable
{
    /**
    * Environment type
    */
    // @ApiMember(Description="Environment type")
    public var environment:String

    required public init(){}
}

// @DataContract
public class GetApiKeysResponse : IMeta, Codable
{
    // @DataMember(Order=1)
    public var results:[UserApiKey]

    // @DataMember(Order=2)
    public var meta:[String:String]

    // @DataMember(Order=3)
    public var responseStatus:ResponseStatus

    required public init(){}
}

// @DataContract
public class UserApiKey : IMeta, Codable
{
    // @DataMember(Order=1)
    public var key:String

    // @DataMember(Order=2)
    public var keyType:String

    // @DataMember(Order=3)
    public var expiryDate:Date?

    // @DataMember(Order=4)
    public var meta:[String:String]

    required public init(){}
}


Swift 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
		}
	}
}