Update API resource

PATCH /api/resources/{id}

Update an API resource details by ID with the given data. This method performs a partial update.

Path parameters

  • id string Required

    The unique identifier of the resource.

application/json

Body Required

  • tenantId string

    Maximum length is 21.

  • name string

    The updated name of the resource.

    Minimum length is 1.

  • accessTokenTtl number

    The updated access token TTL in seconds.

Responses

  • 200 application/json

    The updated resource.

    Hide response attributes Show response attributes object
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • name string Required

      Minimum length is 1.

    • indicator string Required

      Minimum length is 1.

    • isDefault boolean Required
    • accessTokenTtl number Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

PATCH /api/resources/{id}
curl \
 --request PATCH 'https://[tenant_id].logto.app/api/resources/{id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"tenantId":"string","name":"string","accessTokenTtl":42.0}'
Request examples
{
  "tenantId": "string",
  "name": "string",
  "accessTokenTtl": 42.0
}
Response examples (200)
{
  "tenantId": "string",
  "id": "string",
  "name": "string",
  "indicator": "string",
  "isDefault": true,
  "accessTokenTtl": 42.0
}