​
Select Service
ves-io-schema-token-CustomAPI-TokenState
Published April 5, 2023 | Last modified March 20, 2025
Examples of performing token CustomAPI TokenState
Usecase:
Perform TokenState on token
Request:
Request using vesctl:
vesctl request rpc token.CustomAPI.TokenState -i request.yaml --uri /public/namespaces/namespace-literal/tokens/name-literal/state --http-method POST
where file request.yaml has following contents:
{}
Copied!
vesctl yaml response:
obj:
metadata:
annotations:
tu-generated: "yes"
labels:
abc: def
name: token-aecf4793-038f-4380-8007-751399362ada
namespace: system
uid: aecf4793-038f-4380-8007-751399362ada
spec:
gcSpec:
state: VALID
systemMetadata:
finalizers: []
labels: {}
namespace: []
tenant: customer1
uid: aecf4793-038f-4380-8007-751399362ada
Copied!
Request using curl:
curl -X 'POST' -d '{}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build436303540_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/register/namespaces/namespace-literal/tokens/name-literal/state'
Copied!
curl response:
HTTP/1.1 200 OK
Content-Length: 1083
Content-Type: application/json
Date: Tue, 11 Mar 2025 00:57:10 GMT
Vary: Accept-Encoding
{
"obj": {
"metadata": {
"name": "token-aecf4793-038f-4380-8007-751399362ada",
"namespace": "system",
"uid": "aecf4793-038f-4380-8007-751399362ada",
"labels": {
"abc": "def"
},
"annotations": {
"tu-generated": "yes"
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "aecf4793-038f-4380-8007-751399362ada",
"creation_timestamp": null,
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "customer1",
"creator_class": "",
"creator_id": "",
"creator_cookie": "",
"trace_info": "",
"object_index": 0,
"namespace": [
],
"owner_view": null,
"sre_disable": false,
"vtrp_id": "",
"vtrp_stale": false,
"labels": {
},
"direct_ref_hash": ""
},
"spec": {
"gc_spec": {
"state": "VALID",
"type": "NORMAL",
"content": "",
"site_name": ""
}
}
}
}
Copied!