Account
Get the current principal
GET
/
api
/
v1
/
me
Get the current principal
curl --request GET \
--url https://dev.simforge.ai/api/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.simforge.ai/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dev.simforge.ai/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"id": "<string>",
"email": "<string>",
"name": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
},
"principal": {
"kind": "session",
"scopes": [
"<string>"
]
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}Authorizations
A sfc_at_… access token from simforge login, or an sfk_… API key. An operation's security lists the scopes the credential must hold.
⌘I
Get the current principal
curl --request GET \
--url https://dev.simforge.ai/api/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.simforge.ai/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dev.simforge.ai/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"id": "<string>",
"email": "<string>",
"name": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
},
"principal": {
"kind": "session",
"scopes": [
"<string>"
]
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}