Create an API key for the project
consoleSessionvg_session<token>The console's session cookie, set when you sign in. Every operation accepts it, at the role the operation names.
orgId*stringAuthorised orgId; the server must verify organisation/project ownership before any read.
1 <= lengthprojectId*stringAuthorised projectId; the server must verify organisation/project ownership before any read.
1 <= lengthapplication/json- body
name*stringA name for the new key, such as ci.
1 <= length <= 64The new key, with its full secret.
application/json- response
keyId*stringThe key's id, the 12 characters after vgk_; shown in lists and used to revoke it.
^[a-z2-7]{12}$name*stringThe name the admin gave the key.
prefix*stringvgk_ and the key id: the visible start of the key, never the secret.
createdAt*stringWhen the key was created.
date-timecreatedBy*|The email of the admin who created the key.
lastUsedAt*|When the key last read, to the minute.
date-timerevokedAt*|When the key was revoked.
date-timesecret*stringThe full key, vgk_ plus the key id plus the secret. Shown only in this answer; the server keeps its SHA-256.
^vgk_[a-z2-7]{12}_[A-Za-z0-9_-]{43}$curl -X POST 'https://example.com/api/v1/org/string/project/string/keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "keyId": "string", "name": "string", "prefix": "string", "createdAt": "2019-08-24T14:15:22Z", "createdBy": "string", "lastUsedAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z", "secret": "string"}Was this page helpful?