Loading...

Description

Change an Api Key secret.


Request URL

PUT   https://api.3seventy.com/api/v2.1/account/{accountId}/api-key/{keyId}

Request Properties

Parameter Description Mandatory
accountId An account which holds this Api Key. Yes
keyId An Api Key to update. Yes

Response Properties

Property Description
AccountId An account this api key has access to.
Key A key. Used as a login name.
Label User-defined identificator
LastActivity A time of last login.
Secret A secret. Used as a login password.
Type A key type mapping.
TypeId Type of a key.
UserName A user this key is owned by if any. For master keys only.
ValidTo A datetime this key is valid to. For temporary keys only.

C#
PHP


using System;
using System.Collections.Generic;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXXX;

const int keyId = XXX;

var context = new T70Context();

var apiKeyRepo = context.Repository<ApiKey>(new { AccountId = accountId });

var item = apiKeyRepo.Get(keyId);

item.ValidTo = DateTime.Now.AddDays(10);

apiKeyRepo.Update(item);

}

}

 

Stay tuned for JAVA code snippet
Stay tuned for RUBY code snippet
Stay tuned for PHP code snippet