Skip to main content

Search User Metadata

POST 

https://$CUSTOM-DOMAIN/management/v1/users/:id/metadata/_search

deprecated

This endpoint has been deprecated and may be replaced or removed in future versions of the API.

Deprecated: use ListUserMetadata instead.

Get the metadata of a user filtered by your query.

Request​

Path Parameters

    id stringrequired

Header Parameters

    x-zitadel-orgid string

    The default is always the organization of the requesting user. If you like to get users of another organization include the header. Make sure the user has permission to access the requested data.

Bodyrequired

    query object

    Object unspecific list filters like offset, limit and asc/desc.

    offsetuint64
    Example: 0
    limitint64

    Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.

    Example: 100
    ascboolean

    default is descending

    queries object[]

    Metadata object-specific queries.

  • Array [
  • keyQuery object
    keystring
    Example: key
    methodstring

    defines which text equality method is used

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS
  • ]

Responses​

A successful response.

Schema
    details object
    totalResultuint64
    Example: 2
    processedSequenceuint64
    Example: 267831
    viewTimestampdate-time

    the last time the view got updated

    result object[]
  • Array [
  • details object
    sequenceuint64

    on read: the sequence of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    Example: 2
    creationDatedate-time

    on read: the timestamp of the first event of the object

    on create: the timestamp of the event(s) added by the manipulation

    changeDatedate-time

    on read: the timestamp of the last event reduced by the projection

    on manipulation: the

    resourceOwnerresource_owner is the organization an object belongs to (string)
    Example: 69629023906488334
    keystring

    metadata key

    Example: key1
    valuebyte

    metadata value is base64 encoded, make sure to decode to get the value

    Example: VGhpcyBpcyBteSBmaXJzdCB2YWx1ZQ==
  • ]

Authorization: oauth2

name: OAuth2type: oauth2scopes: openid,urn:zitadel:iam:org:project:id:zitadel:audflows: {
  "authorizationCode": {
    "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize",
    "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token",
    "scopes": {
      "openid": "openid",
      "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud"
    }
  }
}

Request Collapse all
Base URL
https://$CUSTOM-DOMAIN/management/v1
Auth
Parameters
— pathrequired
— header
Body required
{
  "query": {
    "offset": "0",
    "limit": 100,
    "asc": true
  },
  "queries": [
    {
      "keyQuery": {
        "key": "key",
        "method": "TEXT_QUERY_METHOD_EQUALS"
      }
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!