AccessToken

URL

https://api.primaerp.com/v1/users/@self/accesstokens

Properties

Name Type Access Required Description
accessToken String read write YES Unique access token obtained from provider.
accountName String read write YES Account name identifies the user with the provider, i.e. e-mail address.
createdAt Date read only no Date of creation.
displayName String read only no Describes an object in human readable form.
id String read write no Unique object identifier.
provider String read write YES Access token provider.
refreshToken String read write no Refresh token obtained from the provider.
trashItem TrashItem read write no Informs whether an object is in the trash. An object is in the trash if a trash item was specified.
updatedAt Date read only no Last modified date.
user User read write YES Associated user.
version Long read write no Object version number.

Metadata

{
    "type" : "AccessToken",
    "path" : "/v1/users/@self/accesstokens",
    "fields" : [
        {
            "type" : "String",
            "name" : "accessToken",
            "description" : "Unique access token obtained from provider.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "accountName",
            "description" : "Account name identifies the user with the provider, i.e. e-mail address.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "Date",
            "name" : "createdAt",
            "description" : "Date of creation.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "String",
            "name" : "displayName",
            "description" : "Describes an object in human readable form.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "String",
            "name" : "id",
            "description" : "Unique object identifier.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "Pattern",
                    "details" : "regexp [0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}"
                },
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "provider",
            "description" : "Access token provider.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "refreshToken",
            "description" : "Refresh token obtained from the provider.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "TrashItem",
            "path" : "/v1/trash",
            "name" : "trashItem",
            "description" : "Informs whether an object is in the trash. An object is in the trash if a trash item was specified.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "Date",
            "name" : "updatedAt",
            "description" : "Last modified date.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "User",
            "path" : "/v1/users",
            "name" : "user",
            "description" : "Associated user.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "Long",
            "name" : "version",
            "description" : "Object version number.",
            "access" : "READ_WRITE"
        }
    ],
    "cascades" : [
        {
            "cascadeType" : "REMOVE",
            "objectTypes" : [
                "TrashItem"
            ]
        }
    ]
}

Dummy data

{
    "id" : "c2fb2dbe-39eb-421a-b07c-5a14671fbbb5",
    "createdAt" : "/Date(1489385953498)/",
    "updatedAt" : "/Date(1489420393498)/",
    "version" : 3,
    "provider" : "google",
    "accessToken" : "8974987412978974984",
    "accountName" : "jsmith@gmail.com",
    "user" : {
        "id" : "71c84cd2-91ac-4e6b-a74e-393c87d5f97d",
        "createdAt" : "/Date(1489385893498)/",
        "updatedAt" : "/Date(1489438393498)/",
        "version" : 5,
        "firstName" : "John",
        "lastName" : "Smith",
        "nickName" : "Smith, J.",
        "email" : "john.smith@example.com",
        "phone" : "55 123 444 567",
        "position" : "Chief developer",
        "timeZone" : "America/Sao_Paulo",
        "dateFormat" : "dd/MM/yyyy",
        "timeFormat" : "K:mm a",
        "weekStart" : 7,
        "language" : "en_US",
        "password" : "",
        "secretKey" : "userSecretKey",
        "confirmed" : false,
        "confirmedEmail" : false,
        "active" : false,
        "birthdayRemind" : "/Date(1490223600000)/",
        "workingTimeStart" : "/Date(1489388400000)/",
        "workingTimeEnd" : "/Date(1489420800000)/",
        "created" : "/Date(1489301593498)/",
        "admin" : false,
        "projectManager" : false,
        "displayName" : "Smith John"
    },
    "refreshToken" : "blX09ao39021das92394=29384/0283na3bgcx2234",
    "displayName" : "jsmith@gmail.com"
}