BctNotification

<back to all web services

RegenerateApiKeys

auth
Requires Authentication
The following routes are available for this service:
All Verbs/apikeys/regenerate
All Verbs/apikeys/regenerate/{Environment}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;

namespace ServiceStack
{
    [DataContract]
    public partial class RegenerateApiKeys
        : IPost, IMeta
    {
        public RegenerateApiKeys()
        {
            Meta = new Dictionary<string, string>{};
        }

        [DataMember(Order=1)]
        public virtual string Environment { get; set; }

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

    [DataContract]
    public partial class RegenerateApiKeysResponse
        : IMeta
    {
        public RegenerateApiKeysResponse()
        {
            Results = new List<UserApiKey>{};
            Meta = new Dictionary<string, string>{};
        }

        [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
    {
        public UserApiKey()
        {
            Meta = new Dictionary<string, string>{};
        }

        [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# RegenerateApiKeys 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.

POST /apikeys/regenerate HTTP/1.1 
Host: notifications.breastcancertrials.org.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	environment: String,
	meta: 
	{
		String: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	results: 
	[
		{
			key: String,
			keyType: String,
			expiryDate: "0001-01-01T00:00:00.0000000",
			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
		}
	}
}