Credentials

Your S3 access key and secret key are what an S3 client uses to talk to the storage endpoint directly — see Upload Files. Your project name is required by every bucket operation.

All requests go to the Storage gateway and need the authentication headers.

Access Key & Secret Key

Query · s3_getUserDetail

Returns the authenticated user's S3 access key and secret key. Takes no arguments.

Request

query S3_getUserDetail {
  s3_getUserDetail {
    id
    mysabayUserId
    serviceCode
    accessKey
    uid
    secretKey
    status
  }
}

Response

{
  "data": {
    "s3_getUserDetail": {
      "id": "668398e9645beaf62d4e0f22",
      "mysabayUserId": 39555695,
      "serviceCode": "String",
      "accessKey": "<ACCESS_KEY>",
      "uid": "39555695",
      "secretKey": "<SECRET_KEY>",
      "status": 1
    }
  }
}

Reset User Key

Mutation · s3_resetUserKey

Resets the user key: generates a new access key / secret key pair. Takes no arguments.

Request

mutation S3_resetUserKey {
  s3_resetUserKey {
    message
    success
  }
}

Response

{
  "data": {
    "s3_resetUserKey": {
      "message": "Generate new credential successfully",
      "success": true
    }
  }
}

Project Name

Query · s3_getUserProject

Returns the authenticated user's project.

Arguments

NameTypeRequiredDescription
serviceCodeStringNoNot sent by the web app

Request

query S3_getUserProject {
  s3_getUserProject {
    id
    mysabayUserId
    projectName
    serviceCode
  }
}

Response

{
  "data": {
    "s3_getUserProject": {
      "id": "668399575535cd7a8efcbc9f",
      "mysabayUserId": 39555695,
      "projectName": "Sell-Product Project",
      "serviceCode": "String"
    }
  }
}